1
0
mirror of https://github.com/cheat/cheat.git synced 2025-05-29 03:17:05 +02:00

Merge pull request from carlosp420/master

cheat awk: sum integers from a file or stdin
This commit is contained in:
Chris Lane 2013-08-27 16:05:08 -07:00
commit 29e9215f82

2
cheatsheets/awk Normal file

@ -0,0 +1,2 @@
# sum integers from a file or stdin, one integer per line:
printf '1\n2\n3\n' | awk '{ sum += $1} END {print sum}'