Re: Need some sed help

Kezdőlap
Csatolmányok:
Üzenet email-ben
+ (text/plain)
+ junk.sh (application/x-sh)
+ (text/plain)
Üzenet törlése
Válasz az üzenetre
Szerző: kitepilot@kitepilot.com
Dátum:  
Címzett: Main PLUG discussion list
Tárgy: Re: Need some sed help
This may help...
ET


Dazed_75 writes:

> I have some C code with lines that look like:
> stuff1; stuff2; spPtr+=stuff3; maybesomestuff4
>
> I can find only the lines of interest using grep spPtr+=foo.c but I
> wondered if I could easily use sed to convert those lines to
> stuff1; spPtr+=stuff3; stuff2; maybesomestuff4
>
> so basically with ; as a delimiter, swapping group 2 and 3 but only for
> those lines containing "spPtr+="
>
> Any ideas?
>
> --
> Dazed_75 a.k.a. Larry
>
> Please protect my address like I protect yours. When sending messages to
> multiple recipients, use the BCC: (Blind carbon copy). Remove addresses
> from a forwarded message body before clicking Send.

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.phxlinux.org/mailman/listinfo/plug-discuss