Just learning the sed, thought of this problem, but do not to come out, thank you.
CodePudding user response:
Because of two file operations, so can only think of using two sed.Sed -n '3, 4 w temp_file file1 & amp; & Sed -i '5 r temp_file file2
CodePudding user response:
Sed - n '3, 4 p' 111. TXT | xargs 1 - I - n {} sed -i '5 s/^/{} \ n/' 222. TXTSeparated with a space by default, if 3, 4 line with no Spaces, can use this