My query is simple to get the summation of values at column level in a text file using shell -- i.e. to add a new record in the text file which includes the sum.
For example here below:
name usersToday usersTommorrow    
Data1 92 181    
DataTwo 5 7    
Something 61 73    
Something_with_long_name 0 0
the desired output is
name usersToday usersTommorrow    
Data1 92 181   
DataTwo 5 7    
Something 61 73  
Something_with_long_name 0 0
Total 158 262
Please note that the text file will be updated with a new data column periodically everyday.
so on day 2 - post the commands for summation are updated the file will be like
name usersToday day2
Data1 92 181    
DataTwo 5 7    
Something 61 73    
Something_with_long_name 0 0
Total 158 262
On day 3 - post new data is appended the file will be like
name usersToday day2 day3
Data1 92 181 52
DataTwo 5 7 53
Something 61 73 25    
Something_with_long_name 0 0 26
Total 158 262 
so I want the summation for day3 needs to be updated.