Skip to content

Instantly share code, notes, and snippets.

@AbinashBishoyi
Created October 5, 2012 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AbinashBishoyi/3840059 to your computer and use it in GitHub Desktop.
Save AbinashBishoyi/3840059 to your computer and use it in GitHub Desktop.
awk max min total
awk '{if($2!=""){if(min==""){min=max=$2}; if($2>max) {max=$2}; if($2< min) {min=$2}; total+=$2; count+=1; if($2>10){print $0}}} END {print total, count, min, max}' test_vec.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment