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
>>
>> 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.com" {/ .. /};/' \
>     /etc/named.conf > newfile

Cool, I didn't think of Perl's range operator "..".
 

-- 
Kevin Pfeiffer
International University Bremen

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to