sum list of numbers in bash 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