![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Remove matching lines with list of strings | Nanu_Manju | Shell Programming and Scripting | 6 | 10-29-2008 05:11 AM |
| using AWK see the upper lines and lower lines of the strings?? | thepurple | Shell Programming and Scripting | 3 | 10-07-2008 11:24 AM |
| Copying common lines to a new file | khestoi | UNIX for Dummies Questions & Answers | 3 | 09-12-2008 06:31 PM |
| To find all common lines from 'n' no. of files | The Observer | Shell Programming and Scripting | 11 | 06-16-2008 03:22 PM |
| how to take out common of two lines in a file | jam_ali49 | UNIX for Advanced & Expert Users | 6 | 11-23-2007 04:48 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
different take on common ?: search for two strings and remove lines between them and
Thank you for assisting, I've got a partial solution just needs a tweak. Code:
Hulk-BASH$ cat somefile.txt oh there is some stuff here some more stuff here START_LABEL stuff I want more stuff I want END_LABEL other stuff here too and even more stuff here too Hulk-BASH$ Hulk-BASH$ sed -n '/^START_LABEL/,/^END_LABEL/p' somefile.txt START_LABEL stuff I want more stuff I want END_LABEL Hulk-BASH$ As you can see it's editing properly but I need the output to have the "LABELS" themselves removed so it looks like: stuff I want more stuff I want Thanks for your help L. Last edited by laser; 12-03-2008 at 04:35 PM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|