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
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
>>
>>
> > 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
> 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
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
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