I have multiple file...it looks like:
ATOM 1244 O VAL 160 7.381 11.465 -2.646 1.000 60.790 0.000
ATOM 1245 CB VAL 160 5.766 13.870 -0.914 1.000 57.640 0.000
ATOM 1246 CG1 VAL 160 7.232 14.074 -0.568 1.000 57.530 0.000
ATOM 1247 CG2 VAL 160 5.065 15.213 -1.089 1.000 58.420 0.000
ATOM 1248 N VAL 1 -14.324 -25.299 8.568 1.000 77.840 0.000
ATOM 1249 CA VAL 1 -14.315 -23.826 8.346 1.000 78.450 0.000
ATOM 1250 C VAL 1 -15.181 -23.169 9.426 1.000 76.690 0.000
Now i have to add "TER" after line:
ATOM 1247 CG2 VAL 160 5.065 15.213 -1.089 1.000 58.420 0.000
This line is same in all the files. So its like i should find this line in all the files and then add "TER" after this line..
I think line can be searched through grep or sed..but how can string be added in the next line? Iam not clear about this code at all..will some one help plz...