Shortest command to calculate the sum of a column of output on Unix?
- by Andrew
I'm sure there is a quick and easy way to calculate the sum of a column of values on Unix systems (using something like awk or xargs perhaps), but writing a shell script to parse the rows line by line is the only thing that comes to mind at the moment.
For example, what's the simplest way to modify the command below to compute and display the…