Sunday, 4 March 2012

awk command to get max value from a file


cat filename |awk 'max=="" || $1 > max {max=$1} END{ print max}'

No comments:

Post a Comment