I need to copy the entire contents of one file into an existing file at a specific location. I know the exact line number where I need to put it. It appears I would use either sed or awk to do this, but I have been unsuccessful so far:
File A
line 1
line 2
line 3
line 4
File B
paragraph 1
paragraph 2
So I would end up with:
File A
line 1
line 2
paragraph 1
paragraph 2
line 3
line 4
Here's what I have been trying to do:
while read line
do
sed '$POSa\$line' B.txt > A.txt
done < B.txt