I have two tmp files named
tmp2 which contains some lines.
1c\ datafile no. 23 2c\ datafile is ok
3c\ datafile no. 24 4c\ datafile is ok
I have a file (named
wrong_file) which entries I want to correct from tmp files
datafile no. 32 datafile is ok datafile no. 42 datafile is ok
My output file (
modified_file) will be like,
datafile no. 23 datafile is ok datafile no. 24 datafile is ok
I want use for loop which will run until the last tmp file and write data from tmp files to final file (Output) instead doing it manually.
I have tried,
sed -f tmp1 wrong_file > file1 sed -f tmp2 file1 > modified_file