Hi.

I am trying to wright a quick script to get DNS nameserver entries from
dhcpd. While the script I have wrote works i would like to see how it
could be done with grep, awk or sed. Here is what I have.

#!/bin/sh

DNSSERVERS=`grep DNS /home/aaron/scripts/dhcpcd-eth0.info`
LIST=${DNSSERVERS//,/ }
newList=${LIST//DNS=/ }

for serv in $newList; do
        echo "nameserver $serv"
done

Thanks
-- 
Aaron


--
[EMAIL PROTECTED] mailing list

Reply via email to