I have a tab-delimited text file containing C1...Cn columns and R1 to Rn rows. Column 10 (C10) has a field 'X'=four comma separated integer values (X=a,b,c,d). I would like do a small arithmetic operation on C10, such as (a/(a+b+c+d))*100 and put the results as new Column (Cn+1) by appending the same file OR in a new out file.
(1) Can anybody help me with a unix shell script to do it for a single file?
(2) If I want loop over the same calculations over multiple files, can you help me with a shell wrapper?