#!/bin/bashh=`hostname`echo "Hostname is $h"ifconfig -a >/tmp/ip.tmpfor eth in `grep 'Link encap:' /tmp/ip.tmp|awk '{print $1}'`do ip=`grep -A1 "$eth" /tmp/ip.tmp|tail -1 |awk '{print $2}'|sed 's/addr://'` echo $eth":"$ipdoneecho "The DNS IP is:"grep 'nameserver' /etc/resolv.conf|awk '{print $2}'