Hi,
I have a set of 10000 files c1.dat ... c10000.dat. Each of these files contains a line which starts with @ and contains a string with spaces specific for this file, lije c37 7.379 6.23.
I have another set of 10000 files kind of determined_cXXX_send.dat (where XXX goes from 1 to 10000). Each of these files has only one line. Each line is of thsis type:
_1 1 3456.000000 -21 0 -98.112830 -20.326192
What I would like to do is, for each number XXX (between 1 to 10000), get from the cXXX.dat file the string like c37 7.379 6.23 , and add it in the file determined_cXXX_send.dat to the beginning of the file so I get:
c37 7.379 6.23 _1 1 3456.000000 -21 0 -98.112830 -20.326192
I tried with both bash and python but got no good solution.
What would be the best approach?
thanks