SyntaxFix
Write A Post
Hire A Developer
Questions
Pure bash and in a one-liner :-)
$ cat numbers.txt 1 2 3 4 5 6 7 8 9 10 $ I=0; for N in $(cat numbers.txt); do I=$(($I + $N)); done; echo $I 55