Mathematical Operations on Column

Hi All,
I want to perform a mathematical operation on column. Can anyone please help?

Here is the sample of operation to be performed:

123 996 100 
123 996 200 
123 996 200 2015-09-21
123 996 100 
123 996 200 
123 996 100 

What I want is to multiple all values of column # 3 by 100 and then summing up all those.

Best Regards,,,

What have you tried?

What operating system and shell are you using?

Hey Don,
I haven't ever used this operation before but now want to learn and use it.

OS is Solaris.

I'm surprised that you have never used addition before...

Assuming that your data is in a file named file , you could try something like:

#!/bin/ksh
sum=0
while read x x v3 x
do	sum=$((sum + v3))
done < file
printf '%d00\n' "$sum"

Note that multiplying by 100 can be done by performing an actual multiplication or by just adding two zeros when you print the results. Adding zeros while printing the results lets you handle larger numbers without overflowing the values that the shell can hold in an object of type signed long integer.