Re: Need a quick sed recipe :-(

2005-08-23 Thread Steven W. Orr
On Tuesday, Aug 23rd 2005 at 14:34 -0400, quoth Steven W. Orr: =>40 Quatloos to the winner. => =>Here's what I need: => =>Look for a marker in a file and delete the line with the marker. Then insert =>file2 at that location. => =>I have => =>sed '/MARKER/d' file =>and I have =>sed '/MARKER/r file2

Re: Need a quick sed recipe :-(

2005-08-23 Thread Kevin D. Clark
> Look for a marker in a file and delete the line with the marker. Then > insert file2 at that location. sed -e '/MARKER/{ r /tmp/file2 d }' file --kevin -- Kevin's new Elephant Memory Systems Tribute Page: http://home.comcast.net/~kevin_d_clark/ems/ __

Re: Need a quick sed recipe :-(

2005-08-23 Thread Michael ODonnell
# echo This is the replacement line >/tmp/replacementFile # cat

Need a quick sed recipe :-(

2005-08-23 Thread Steven W. Orr
40 Quatloos to the winner. Here's what I need: Look for a marker in a file and delete the line with the marker. Then insert file2 at that location. I have sed '/MARKER/d' file and I have sed '/MARKER/r file2' file but I'd like to just put the two together in one sed command. (Two -e options