i have this data :
Values
10
20
30
40
50
12
15
18
I want to have the max of the column, skipping the first line so i tried :
awk 'NR>1 || a<$1{a=$1} END{print a}' file.txt
But it returns 18 when I expected 50. Where is my mistake ?
P.S :
awk ' a<$1{a=$1} END{print a}' file.txt
It returns Values which is not good either
Get the minimum values from a single column file with a header:
Get the maximum values from a single column file with a header: