Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Add "1234" to specific field in second column

$
0
0
i have this file

Code:

073274753,0544901701,20101201,000316
038873722,69647455,20101130,235257
26213399,0545335767,20101201,000930
063330167,0566000101,20101201,000226
026773376,11966,20101130,234429,1194
075431120,0565900600,20101201,000428
75431120,0565900600,20101201,000538
038239110,0569224091,20101130,235616
035933611,0568580075,20101130,235939
025668601,0565651151,20101201,000046

i need if i have in first column any number doesn't start with zero i will add zero to it like this

Code:

75431120,0565900600,20101201,000538
Code:

075431120,0565900600,20101201,000538
also if i have in second column any number doesn't start with zero add "1234" to it
Code:

026773376,11966,20101130,234429,1194
Code:

026773376,123411966,20101130,234429,1194
and print all lines in the file "modificated and non modificated" all

Viewing all articles
Browse latest Browse all 16232

Trending Articles