Skip to content

Instantly share code, notes, and snippets.

@luoyuping
Created March 25, 2018 08:42
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 luoyuping/5647015ca96dd3d739bb91ef81379b19 to your computer and use it in GitHub Desktop.
Save luoyuping/5647015ca96dd3d739bb91ef81379b19 to your computer and use it in GitHub Desktop.
sum all number in a file using awk
awk '{ sum += $1 } END { print sum }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment