Originally Posted by chakka.lokesh
I tried this
sed 'R file2; s/\n//' file1
but it didn't work. I don't know why? can u please tell me why ?
On my system the R command takes the full string after it upto the quote as the filename.
So in your example it would be looking for a file named "file2; s/\n//" not one named "file2".
Also the inserted lines are put into the output stream not into the pattern space.