bash sum list of numbers code example
Example: sum of output unix
perl -lne '$x += $_; END { print $x; }' < mydatafile
or
awk '{s+=$1} END {print s}' mydatafile
perl -lne '$x += $_; END { print $x; }' < mydatafile
or
awk '{s+=$1} END {print s}' mydatafile