![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
SED Help
Hi,
I have taken over maintaining some sed scripts and need a bit of help. I have a file that launches a few sed commands like: ... sed -f $SCRIPT_PATH/keep_jsp $LOGPATH/report > $REPORT_PATH/jsp1 sed -f $SCRIPT_PATH/keep_htm $LOGPATH/report > $REPORT_PATH/htm1 ... and the 'keep' file is as follows: ... / *\.pdf */!d ... Basically this example keeps only the lines that have .pdf in them. What I want to do is keep both .pdf and .kml How can I modify just the one line in the 'keep' file to not delete pdf and kml lines? I don't want to mess with the whole structure of the scripts and change the sed line (the first file) to inclide -e's and stuff like that. any help would be greatly appreciated. Rob |
|
||||
|
No, that didn't work.
Any other ideas? I need to do this in on line and not change any of the other functionality. If I do the following: ------------------ / *\.pdf */!d / *\.kml */!d ------------------ all I get is the lines that have .kml in them. I want to basically have both lines applying but need them in one line (if you get what i mean) thanks, Rob |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|