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
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 "
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/\.[^\.]*$//'
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;
};
};