On 09:56 26 Jan 2003, Bret Hughes <[EMAIL PROTECTED]> wrote:
| > | the g/foo/ one I am going to have to read up on before beginning to ask
| > | a question about it :) 
| > 
| > Thinks of it like a pre-grep for the target lines.
| 
| Yeah I get the g/foo/ part it is the .-2,.+2m0 that looks like gibberish
| to me :)

Find every line containing foo. For each of these, move the 5 lines from
2 before to to 2 after it to the top of the file.

| BTW does this g/foo s/BLAH/blah/g syntax extend to tools other than vi? 
| I can;t really think of where it would apply but I thought I would ask.

Well, ed. Which I do use from time to time.

It really only makes sense in some kind of line oriented editor context.
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

He's silly and he's ignorant, but he's got guts, and guts is enough.
        - Sgt. Hartmann



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to