finding greatest value in a column using awk from iostat output in linux

Friends,
.
On linux i have to run iostat command and in each iteration have to print the greatest value in each column.

e.g

iostat -dt -kx 2 2 | awk ' !/sd[a-z][0-9]/ &&!/%util/ && !/Time/ && !/Linux/ {print $12}'

4.38
0.00

0.00
0.00

What i would like to print is only the greatest value in each iteration. Can someone guide me with this.

iostat -dt -kx 2 2 | awk ' !/sd[a-z][0-9]/ &&!/%util/ && !/Time/ && !/Linux/ {if(max < $12)max=$12}END{print max}'

or

iostat -dt -kx 2 2 | awk ' !/sd[a-z][0-9]/ &&!/%util/ && !/Time/ && !/Linux/ {print $12}' | sort | tail -1

cheers,
Devaraj Takhellambam

Dont open multiple threads for the same issue, delete this one.

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Proceed here:

http://www.unix.com/shell-programming-scripting/131223-finding-greatest-value-column-using-awk-iostat-output-linux.html\#post302400024

Thank You.

The UNIX and Linux Forums.