Re: [techtalk] need help with a shell script

2000-09-26 Thread Andrew Wendt
On Tue, 26 Sep 2000, Laurel Fan wrote: >Here's a way to get the [domain-minus-top-level-domain] part: > > echo $DOMAIN | sed -e 's/\.[^\.]*$//' If you're using bash, you can also do this directly from the shell: echo "${DOMAIN%.*}" This will take the shortest amount of text matching the glob

Re: [techtalk] need help with a shell script

2000-09-26 Thread Olivier Tharan
Le 26 septembre 2000 a 11:41, alissa bader a écrit : > zone "domain.com" { > type slave; > file "d/db.domain"; [ ... ] > The way I have it written so far is: > #!/bin/sh > for DOMAIN in `cat /tmp/ns1stuff` > do > echo "zone" '"'"$DOMAIN"'"' "{" >> /etc/named.conf > echo "

Re: [techtalk] need help with a shell script

2000-09-26 Thread Laurel Fan
Excerpts from linuxchix: 26-Sep-100 [techtalk] need help with a.. by alissa [EMAIL PROTECTED] > with the "file" line reading like: > [first-letter-of-domain]/db.[domain-minus-top-level-domain] Here's a way to get the [domain-minus-top-level-domain] part: echo $DOMAIN | sed -e 's/\.[^\.]*$//'

[techtalk] need help with a shell script

2000-09-26 Thread alissa bader
hey there. I am trying to write a shell script to update the named.conf file on our secondary nameserver. I want the formatting to read: zone "domain.com" { type slave; file "d/db.domain"; ^^ masters { 204.177.32.2; }; };