clx
1
Hi friends,
I am in a little confusion.
I have a comma separated file contains hugh records.
say,
88562848,21-JAN-08,2741079, -1188,-7433,TESTING
88558314,21-JAN-08,2741189, -1273,-7976,TESTING
I want 4th and 5th field to be multiplied by 100.
like,
88562848,21-JAN-08,2741079, -118800,-743300,TESTING
88558314,21-JAN-08,2741189, -127300,-797600,TESTING
Is this can be done by sed? or any by other efficient way?
Please suggest.
Thanks in advance.
pludi
2
$ cat csv.txt
88562848,21-JAN-08,2741079, -1188,-7433,TESTING
88558314,21-JAN-08,2741189, -1273,-7976,TESTING
$ awk -F, '{$4*=100;$5*=100;print $1","$2","$3","$4","$5","$6}' csv.txt
88562848,21-JAN-08,2741079,-118800,-743300,TESTING
88558314,21-JAN-08,2741189,-127300,-797600,TESTING
$
clx
3
Hi Pludi,
Thanks for the solution.
Its working.
-Anchal
awk -F"," '{$4*=100;$5*=100;print}' filename