Hello All,
I need a urgent help regarding one issue here.
Let me explain the problem.
I have a file "player" which contains three players with their RUN and ECONOMY rate.
----------
Name Run Economy
David 23 8
stuart 12 12
string 33 4
-----------
Now i want to find best player who has highest run but lowest economy rate.
Means according to this file best player shud be "string".
How i proceed ...
first i took highest run and lowest economy in a variables (i and j).
i=`cat player | awk 'BEGIN { FS= " " } {print $2}' | grep -v Run | sort -nr | head -1`
---------
bash-3.1$ echo $i
33
------
j=`cat player | awk 'BEGIN { FS= " " } {print $3}' | grep -v Economy | sort -n | head -1`
---------
bash-3.1$ echo $j
3
bash-3.1$
----------
Now the problem is how to match two fields that am not sure.
Plzzz help me .. :
