OPA -JAVA UNIX Student details
#!/bin/bash
read
awk 'BEGIN{FS=",";t=0}
{
a[t]=$1;
b[t]=$3+$4;
c[t]=$2;
t=t+1
}
END
{
for(i=0;i<t;++i)
{
ma=0;
pos=i;
for(j=0;j<t;++j)
{
if (b[j]>ma)
{
ma=b[j];
pos=j;
}
}
if (b[pos]>99)
print a[pos],c[pos];
b[pos]=-1;
}
}
'
No comments:
Post a Comment