sum up a column in command line code example
Example 1: sum column bash
<cmd> | paste -sd+ | bc
# Using stdin
Example 2: sum column bash
paste -sd+ infile | bc
# Using existing file
<cmd> | paste -sd+ | bc
# Using stdin
paste -sd+ infile | bc
# Using existing file