![]() |
|
|
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 |
| call shell script from perl cgi script problem | raksha.s | Shell Programming and Scripting | 2 | 03-25-2009 04:50 AM |
| ssh script problem problem | pcjandyala | Shell Programming and Scripting | 2 | 07-31-2008 04:27 PM |
| One more problem with script | syndex | Shell Programming and Scripting | 4 | 07-11-2007 05:48 PM |
| awk script Problem | pbsrinivas | Shell Programming and Scripting | 6 | 07-05-2007 11:04 AM |
| Problem starting a script from a 'main'-script | Rakker | UNIX for Dummies Questions & Answers | 3 | 06-28-2005 09:12 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
My file is having the contents like this
AND1 (A) { non : hafe on: tc ma : nite } AND1 (B) { non : hafe1 on: tc1 ma : nite1 } AND1 (C) { non : hafe3 on: tc2 ma : nite3 } I have written a sed script to search the patterns AND1(A) and AND1 (B) and delete the entire content in these Blocks including the Patters AND1 (A) and AND1 (B) but to my surprise the whole file content is getting deleted This is my sed script sed -n '/AND1 (A)/,/AND1 (B)/ { /non/d ;}'file > file1 My new file content should be AND1 (C) { non : hafe3 on: tc2 ma : nite3 } but the whole file is getting deleted Can someone give me advice ? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|