how to add all numbers in a file using javascript code example Example: bash add all numbers awk '{ sum += $1 } END { print sum }' file