Last Updated: February 25, 2016
·
419
· lokiastari

Sum a file of number

If you have a file(s) of numbers (one per line) that you want to sum

paste -sd+ <File Name List> | bc

Or from another command

<Command> | paste -sd+ | bc