![]() |
|
|
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 |
| Configuring snmpd.conf and snmptrapd.conf | jagdish.machhi@ | UNIX for Advanced & Expert Users | 2 | 04-17-2008 04:01 PM |
| newsyslog.conf | mirusnet | UNIX for Advanced & Expert Users | 1 | 02-24-2008 11:11 AM |
| how to delete entry in file "wtmpx"(/var/adm/wtmpx) | arm_naja | UNIX for Advanced & Expert Users | 4 | 03-08-2006 04:00 AM |
| dhcpd.conf | keliy1 | Linux | 1 | 11-17-2004 04:05 PM |
| dns and resolv.conf | b03der | UNIX for Dummies Questions & Answers | 10 | 07-26-2002 05:34 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
delete dhcp.conf entry using sed
I am trying to use sed to remove entries from my dhcpd.conf file. The form of the file is: Code:
host foo {
option 1
option 2
}
host bar {
option 1
option 2
}
I was trying to use a label like: Code:
sed -e :a -e "s/^host bar {[^}]*//g;/{/N;//ba" /etc/dhcpd.conf
I want to delete every from "host bar" to the "}". Any thoughts? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|