I have an O/p file below and I'm looking for a bash and Perl solution:
Aggregate total used avail capacity
aggr0 100 59 41 41%
aggr1 200 100 100 50%
aggr2 300 150 150 50%
aggr3 400 200 200 50%
I would like to calculate the sum of all individual column except Col-1. The final state should look like this:
Aggregate total used avail capacity
aggr0 100 59 41 41%
aggr1 200 100 100 50%
aggr2 300 150 150 50%
aggr3 400 200 200 50%
=========================================================
1000 509 460 50.9% (Used % of all aggr's)