I would like to know how to insert three 0 in the beginning of the third field in a csv file. The data would be someting like:
XV0126578,RGBYX,1234567
NV4567802,GYXTV,2345678
What I am looking for is to have
XV0126578,RGBYX,0001234567
NV4567802,GYXTV,0002345678
I am using this in a command line option and need to keep the out to a new file in the same order. Something similar to
cat testcsv.csv | awk -F, '{OSF=","; print $1, $2, $3}' >>outputfile.csv
XV0126578,RGBYX,1234567
NV4567802,GYXTV,2345678
What I am looking for is to have
XV0126578,RGBYX,0001234567
NV4567802,GYXTV,0002345678
I am using this in a command line option and need to keep the out to a new file in the same order. Something similar to
cat testcsv.csv | awk -F, '{OSF=","; print $1, $2, $3}' >>outputfile.csv