Skip to content

Instantly share code, notes, and snippets.

@ninadsp
Last active January 11, 2016 06:12
Show Gist options
  • Save ninadsp/35490fc3ad8a6a5bbad3 to your computer and use it in GitHub Desktop.
Save ninadsp/35490fc3ad8a6a5bbad3 to your computer and use it in GitHub Desktop.
awk_sum_test.sh
echo '1
2
3
4
5' | awk '{sum += $0} END {print sum}'
@hiway
Copy link

hiway commented Jan 11, 2016

Skip the $ in awk '{sum += $0} END {print sum}'

@ninadsp
Copy link
Author

ninadsp commented Jan 11, 2016

Done, works, thanks! Can I dogetip on GH?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment