I wrote the following awk program:
Code:
cat "$fileToProcess" | awk '!(/LINUX|.inux/ || /\%/ || /.verage/ || /^$/)\
{
("date --date="$1 $2" +%T") | getline correctTime;
printf "%s\t", correctTime;
for (i=3; i<NF; i++) printf "%s\t", $i;
printf "\n"
close("date --date="$1 $2" +%T")
}'
to parse a file. The program works as expected, but I'm curious as to why the spacing between column 1 and column 2 is greater than the other columns. Here is a sample of the output:
Code:
20:10:01 all 19.31 0.00 2.90 0.24 0.00
20:20:01 all 10.30 0.00 1.97 0.22 0.00
20:30:01 all 11.36 0.00 2.26 0.19 0.00
20:40:01 all 12.04 0.00 2.37 0.20 0.00