Difference between revisions of "bash sum series of numbers with awk"
From thelinuxwiki
(Created page with "for a series of numbers on different lines of a file or on different lines of stdin, awk will do... awk '{s+=$1} END {print s}' category:scripting category:awk") |
Revision as of 05:20, 22 August 2013
for a series of numbers on different lines of a file
or
on different lines of stdin, awk will do...
awk '{s+=$1} END {print s}'