I have two textfiles:
file2, both with several lines.
$ cat file1 line one line two line three line four line five $ cat file2 line A line B line C line D line E line F
I would like to substitute a range of lines of
file1 (from line
1_start to line
1_end) with a range of lines of
file2 (from line
2_start to line
For example, substitute lines
file1 with lines
What I only could do till now is to extract the needed lines from
$ sed -n 3,5p file2
But it doesn't help putting them in
file1. Is it possible with
sed? If not, is it possible with a similar tool?