sed help needed

S. Anthony Sequeira tony at sequeira.org.uk
Mon Feb 14 11:07:45 PST 2005


On Mon, 2005-02-14 at 11:49 -0700, Archaic wrote:
> 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).
> 

I'd use awk, $FNR (?) to give you the line number to manipulate the
string.

Pretty straightforward, there are many (g)awk examples on the web.

I'm sure you can work it out 8), give me a shout if you need further
info. 

Cheers.
-- 
Know Thy User.




More information about the lfs-chat mailing list