gborrageiro
Technical User
hello,
I'm having trouble printing the minimum numerical value in a column. When I try printing the maximum value it works fine. It's almost as if awk does'nt like the '<' parameter.
The command I run is:
cat file | awk '$5 < min {min=$5; minline=$0}; END{ print min, minline}'
The result is just blank. I know column 5 is right because this returns correct values:
cat file | awk '{ print $5 }'
your help is appreciated.
regards
G
I'm having trouble printing the minimum numerical value in a column. When I try printing the maximum value it works fine. It's almost as if awk does'nt like the '<' parameter.
The command I run is:
cat file | awk '$5 < min {min=$5; minline=$0}; END{ print min, minline}'
The result is just blank. I know column 5 is right because this returns correct values:
cat file | awk '{ print $5 }'
your help is appreciated.
regards
G