![]() |
|
|
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 |
| Grep Three Words | murbina | UNIX for Dummies Questions & Answers | 12 | 08-14-2008 04:38 AM |
| Delete words in File 1 from File 2 | Enobarbus37 | Shell Programming and Scripting | 14 | 02-15-2008 08:09 AM |
| Delete lines that contain 3 or more words? | revax | Shell Programming and Scripting | 5 | 12-11-2007 06:33 PM |
| Get the words.. | kakashi_jet | Shell Programming and Scripting | 10 | 07-31-2006 10:30 AM |
| sed option to delete two words within a file | klannon | UNIX for Dummies Questions & Answers | 4 | 04-15-2002 08:25 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I have the following codes below that aims to delete every words between two pattern word. Say I have the files Quote:
Code:
#!/bin/sh
sed '
/WISH_LIST=\"/ {
N
/\n.*\"/ {
s/WISH_LIST=\".*\n.*\"/WISH_LIST=\"\n\"/
}
}' file.txt
Code:
#!/bin/sh
sed '
/WISH_LIST=\"/ {
N
/WISH_LIST=\".*\"/ {
s/WISH_LIST=\".*\"/WISH_LIST=\"\n\"/
P
D
}
}' file.txt
Quote:
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|