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