sed help needed

Archaic archaic at
Mon Feb 14 10:49:48 PST 2005

On Mon, Feb 14, 2005 at 03:29:38PM +0000, Bennett Todd wrote:
> Modulo quux -vs- quuz (typo?), I believe this works as requested:

Yes, it was a typo. However, since I accidentally replied to you
privately, he's a repeat for the list:

>     sed -ne '/line a/,/line b/d' -e 's/^# //p' -e '/line c/q' 

The first part works like a charm affecting only lines a to v, the
second doesn't because it changes things outside of the range which
needs to be lines b to c. Can sed remember it's location in the file
even after line b is removed?

And to make it known more clearly to everyone, this is inside a larger
body of text, hence the need for strict limiting between lines a to c
(which are one chunk not separated by other text).


Want control, education, and security from your operating system?
Hardened Linux From Scratch

More information about the lfs-chat mailing list