Search max value in a column in a file instead of sort

Hi Everyone,
1.txt

00:00:00        0       0       0       0       0       0       0
00:00:01        0       0       0       2       1       33       2
00:00:02        5       0       0       0       0       0       0
00:00:03        0       4       0       0       0       0       0
00:00:04        0       0       3       0       0       0       0
00:00:05        0       0       0       0       0       0       0

the 1.pl

for ($x=2; $x<=8; $x++) {
$tmp = `sort -nk$x 1.txt | tail -1 | cut -f$x | tr -d '\n'`;
$string_1=$string_1.$tmp."\t";
}

instead of this loop sort method, is there any simple, or awk, sed, other ways? Thanks :confused:

Could you please post the expected result, given the data you provided?

Sorry, forgot to include the expected output.

5	4	3	2	1	33	2

Thanks

Use gawk, nawk or /usr/xpg4/bin/awk on Solaris.

awk 'END { 
  for (i = 1; ++i <= NF;) 
    printf "%s", (_ (i < NF ? "\t" : RS))
    }
{ 
  for (i = 1; ++i <= NF;) 
    $i > _ && _ = $i 
    }' 1.txt

@ radoulov. Shouldn't that be:

$i > _ && _ = $i 

Sure,
thanks for the correction.