![]() |
|
|
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 |
| Need help in sed command (adding a blank line btw each block generated by pattern) | frozensmilz | Shell Programming and Scripting | 2 | 01-08-2009 12:12 AM |
| Adding a block to the file | ROOZ | Shell Programming and Scripting | 4 | 08-20-2008 05:34 PM |
| Perl: Search for string on line then search and replace text | Crypto | Shell Programming and Scripting | 4 | 01-04-2008 10:24 AM |
| Adding default search path for CPP | boyanov | UNIX for Dummies Questions & Answers | 1 | 09-10-2007 02:46 AM |
| Search/replace using visual block | Manan | UNIX for Dummies Questions & Answers | 0 | 12-21-2006 03:16 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
Code:
sed '/;$/a\---------------------' infile I just realize that I answered a bit fast. Your sed statement gives and error when I use it. On your second output all lines with those multiple "e"s are gone. From your description I didn't even see that you wanted to remove those lines. If the statement above isn't what you want, best just print simple input and output. Last edited by zaxxon; 01-21-2009 at 04:54 AM.. Reason: added comment |
|
||||
|
Quote:
Code:
awk '/exec/{p=1}/;$/{;print;print "-----------";p=0}p' file
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|