My notepad
Chris' IT notes…
Home
Here are my notes…
☀ / ☾
← Back
BASH: Sum all numbers in a list
8 Feb 2017
sh
sum
=
0
;
for
i
in
`
cat
list.txt
`
;
do
do
sum
=
`
expr
$sum
+
$i`
;
done
;
echo
$sum