|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | 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. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
recursively delete the text between 2 strings from a file
i have 200000bytes size of a unix file i need to delete some text between two strings recursively using a loop with sed or awk . these two strings are : 1st string getting from a file :::2 nd string is fi...its constant . can anyone help me sed -n'/<1 st string >/,/fi/' <input_filename> is the command i want to use ....
|
| Sponsored Links | ||
|
|
|
|||
|
using below code
for i in `cat <first_string_used_file>`
do sed -n '/$i/,/fi/' <input_file> >> lbl_file done |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| delete files recursively in the specified directory | deepthi.s | Shell Programming and Scripting | 3 | 08-13-2008 11:03 PM |
| delete files older than 5 minutes in directory (recursively) | scarfake | Shell Programming and Scripting | 3 | 06-13-2008 02:10 AM |
| replacing strings with text from other file | mc1392 | Shell Programming and Scripting | 1 | 03-24-2008 03:46 PM |
| Delete strings in a file | ayhanne | Shell Programming and Scripting | 8 | 11-09-2007 09:48 AM |
| extracting a set of strings from a text file | Deanne | Shell Programming and Scripting | 2 | 09-21-2007 12:31 AM |