Re: multi-line matches / named.conf parsing

2003-06-24 Thread Jeff 'japhy' Pinyan
On Jun 24, Kevin Pfeiffer said: >>> sed '/zone "domain.com" {/,/};/d' /etc/named.conf > newfile >>> >>> How might one do this in Perl? >> >> perl -ne 'print unless /zone "domain.com" {/ .. /};/' \ >> /etc/named.conf > newfile > >Cool, I didn't think of Perl's range operator "..". Don't be foo

Re: multi-line matches / named.conf parsing

2003-06-24 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Paul Johnson wrote: > > Kevin Pfeiffer said: > >> In comp.unix.shell Alan Murrell posted this clever sed solution for >> removing entries from his named.conf file using only the domain name): >> >> sed '/zone "domain.com" {/,/};/d' /etc/named.conf > newfile >> >>

RE: multi-line matches / named.conf parsing

2003-06-24 Thread Dan Muey
> > sed '/zone "domain.com" {/,/};/d' /etc/named.conf > newfile > > > > Instead of using actual line numbers for the range of lines (such as > > "1,4") he uses two regexes that match to them. > > > > How might one do this in Perl? > > Just the same way: > > perl -ne 'print unless /zone "domain.co

RE: multi-line matches / named.conf parsing

2003-06-24 Thread Dan Muey
> Hi all, Howdy, > > In comp.unix.shell Alan Murrell posted this clever sed > solution for removing > entries from his named.conf file using only the domain name): > > sed '/zone "domain.com" {/,/};/d' /etc/named.conf > newfile > > Instead of using actual line numbers for the range of lines

Re: multi-line matches / named.conf parsing

2003-06-24 Thread Paul Johnson
Kevin Pfeiffer said: > In comp.unix.shell Alan Murrell posted this clever sed solution for > removing entries from his named.conf file using only the domain name): > > sed '/zone "domain.com" {/,/};/d' /etc/named.conf > newfile > > Instead of using actual line numbers for the range of lines (such

multi-line matches / named.conf parsing

2003-06-24 Thread Kevin Pfeiffer
Hi all, In comp.unix.shell Alan Murrell posted this clever sed solution for removing entries from his named.conf file using only the domain name): sed '/zone "domain.com" {/,/};/d' /etc/named.conf > newfile Instead of using actual line numbers for the range of lines (such as "1,4") he uses two