Ok fine ..i figured out a bit ...
here is the code
cat $INP_FILE1 | while read line
do
echo "$line" | nawk ' BEGIN {FS=","} {print("5",$1,$28,"$27",$26)}' >> $OUT_FILE1
done
But my question now is i want the above action to be performed only when the first column of the input file is having value 3 ..like when line starts with 2 or 1 it should skip those lines
Example of my input file :
1,12,,2099,IF_TB001, 1
2,12,,2099,, 2
3,,103900002,100,110,103900002.116510.,,,,,EUR,,,,,,,47353.17,,,,CT_ACCT,,,,0000000000,JDE,0.00, 3 3,,103900003,100,110,103900003.116510.,,,,,EUR,,,,,,,11457.13,,,,,,,,0000000000,JDE,0.00, 4
Output
0201107051728Corinthian FMCFS CTRON_GL 000188000000000098614.02-00 0000000098614.02+ 140 X
520110614088A20705K USD 0000000008177.41+14088A2000705K0000000000000000000000 X
520110614088471705K USD 0000000000225.00+1408847100705K0000000000000000000000 X