Hi All,
Thank you very much for your explaination.
@marcus121 : This is pretty clear now. just one point..
Quote:
awk -F, '{printf("%i,%s,%s,%i,%i\n",$1,$2,$3,$4,$5)}' filename | grep -v '0,,0,0,0,,'
It is clear that above will print only 5 fields ( exclude TESTING
i.e
Quote:
88562848,21-JAN-08,2741079, -1188,-7433,TESTING
88558314,21-JAN-08,2741189, -1273,-7976,TESTING
now grep -v '0,,0,0,0,,' , I guess pointing to -
1 st field - 0
2nd - null
3rd, 4th, 5th - 0
6 th - null ..
but in the resulting file, there will be no 6th field (TESTING) !!. then for what purpose, the last 2 commas are there in grep?
also, regarding the comma in 5th and 6th field in the new file..
my requirement is..
instead of 2,25 i want to print (2*100)+25 i.e 225
in general, 4th and 5th field, i want the below value
(value_before_comma*100)+value_after_comma
though I am working on it.. trying like $4*=100 but I am having problem in splitting both values for doing different calulation
I appreciate if i can get some clue.
Thanks.