Hello, I've got 2 sed questions:
(1) I want to take several lines of text that all contain a common
pattern and replace them with lines of text from another file. The lines
are all in one contingious block (i.e. they are all one after the other).
So in regexp talk, I want to match everything from the first occurance of
_pattern_ through to the last occurance of _pattern_, delete it, and then
at that spot in the file, read in another file. How do I do this with sed?
(2) I want to match everything in a file up to the first blank space. With
an ed(1) command, I would simply do
but this doesn't seem to work in sed. Also, for both of these commands, I
want to issue the edit on the command line (using -e), not from a file.
Please reply to news, my e-mail may bounce.
Derek Douville BELL SYGMA - TELECOM SOLUTIONS /
UNIX Technical Support (Internal) System Administration /
Phone: (613) 781-8242 E-Mail: bouncy bouncy bounce /