![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| regexp help | TinCanFury | Shell Programming and Scripting | 0 | 04-06-2008 07:21 PM |
| In Help, Substitute Text ... | solidhelix08 | Shell Programming and Scripting | 6 | 02-07-2008 05:21 AM |
| regexp with sed again!!! | andy2000 | Shell Programming and Scripting | 2 | 05-03-2007 11:15 AM |
| Substitute in vi | kingdbag | UNIX for Dummies Questions & Answers | 5 | 01-17-2007 02:42 PM |
| regexp | penfold | UNIX for Advanced & Expert Users | 1 | 06-28-2005 08:45 AM |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
vi + regexp + substitute
Another enigma (for me) Using VI I edit some files in which I want to erase many lines I don't need anymore usually I do something like that: Code:
:%s/line_to_suppress//g and it is doing fine but in this case, the pattern to erase contains some special characters so I do it like that: Code:
:%s#line_to_suppress_with_special_characters##g but, the only problem left is that I can't predict what will be the beginning of the line so I wish I could do something like that: Code:
:%s/*line_to_suppress//g but of course if I protect the pattern with # to prevent special characters to annoy me... the * don't work anymore the best way would be to suppress each line containing my pattern, but I don't know how to do that I'm sure it's pretty easy for many among you, so if one have a bit of time, it would help me a lot Thanx |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|