How to find maximum and minimum value from the below table using awk
command.
20 90 60 30
55 75 80 85
10 15 99 95
55 95 70 20
9 35 85 75
I want the output like max value=99
and min=9
How to find maximum and minimum value from the below table using awk
command.
20 90 60 30
55 75 80 85
10 15 99 95
55 95 70 20
9 35 85 75
I want the output like max value=99
and min=9
The test resulting in "NaN" is to accommodate empty input files.
with gnu awk:
output:
without awk:
e.g.
min:
max:
you can of course
xargs -n1|sort -n
then pipe to awk to pick first and last and print in one shot.If you have
GNU awk
: