|
Post-grep-like operations: msg#00043editors.sed.user
I am wanting to select lines containing 'fruit' or 'veg', and then carry out some operation on them, say substitution X for a. Eg. fruit banana fruit fly meat beef veg carrot to fruit bXnXnX fruit fly veg cXrrot I am trying to do this in a sed file: /fruit/b /veg/b d s/a/X/g using the grep like command in the one-liners document. The last expression doesn't get carried out. I guess something is happening with the buffer, but do not understand what. I can't find '/b' in the documentation. I am trying to avoid having to do multiple passes of the data, but maybe I can't. Any help much appreciated, Rob ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/dkFolB/TM --------------------------------------------------------------------~-> -- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/sed-users/ <*> To unsubscribe from this group, send an email to: sed-users-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: sed to take 3 lines with same variable: 00043, shamrul ismawi |
|---|---|
| Next by Date: | Re: Post-grep-like operations: 00043, Lorance Stinson |
| Previous by Thread: | Text Substitution and Scripti: 00043, Venky Chakravarthy |
| Next by Thread: | Re: Post-grep-like operations: 00043, Lorance Stinson |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |