I want a simple way to add the same text (e.g. "bye" or more lines) to a group of files using a small script. I tried something with ed
and vi
inside of a script, but it did'nt work.
Edit: I edit this coment to be more specific:
I have the files c0001.gin c0002.gin ... up to let's say 500. I need to add to the end of each file the next text:
species
Ca core 2.00000000
Co core 2.00000000
C core 1.34353898
O core 1.01848700
O shel -2.13300000
buck intra
O core O core 4030.3000 0.245497 0.00000000 0.00 2.50 1 0 0
buck
Ca core O shel 2154.0600 0.289118 0.00000000 0.00 10.00 1 0 0
Co core O shel 1095.6000 0.286300 0.00000000 0.00 10.00 1 0 0
Ca core C core 120000000.000 0.120000 0.00000000 0.00 10.00 1 0 0
Co core C core 95757575.760 0.120000 0.00000000 0.00 10.00 1 0 0
buck inter
O shel O shel 64242.454 0.198913 21.843570 0.00 15.00 1 0 0
morse intra bond
C core O core 5.0000000 2.5228 1.19820 0.0000 1 0
three
C core O core O core 1.7995 120.00
outofplane bond intra
C cor O cor O cor O cor 8.6892 360.0
spring
O 52.740087
I want just a script to do that.
Furthermore, the files are in folder called "CALCS" and I wanted to move each file to another folder inside CALCS called "001" for c0001.gin, "002" for file c0002.gin and so on.
Thanks in advance