Appending a string to columns in a file
Hi........
I hav a file like this...
1A4G:A 1A4G:B 0.2
1A4G:A 1CT1:F 3.2
1A4G:A 1CT1:G 3.4
1A4G:A 1DBN:B 3.2
1A4G:A 1F31:A 3.1
1A4G:A 1FV2:A 4.1
after the 1st and 2nd field's last charecter ends, i wan ".PDB" to be added to both 1st and 2nd fields.....(not to the 3rd field)
means.....
1A4G:A.PDB 1A4G:B.PDB 0.2
1A4G:A.PDB 1CT1:F.PDB 3.2
1A4G:A.PDB 1CT1:G.PDB 3.4
i know the logic like using the strcat in C.....
But thought shell can be easier
So.....
Plz suggest.....
|