Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

sum of output unix

perl -lne '$x += $_; END { print $x; }' < mydatafile
or
awk '{s+=$1} END {print s}' mydatafile
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sum #output #unix
ADD COMMENT
Topic
Name
9+7 =