#!/bin/rc rfork en if (~ $#* 0) { echo 'usage: host target [target...]' >[2=1] exit usage } for (i in $*) { ifs='' Arec=`{echo $i ip | ndb/dnsquery | sed 's/\> //g'} ifs='' MXrec=`{echo $i mx | ndb/dnsquery | sed 's/\> //g'} #echo $Arec echo $Arec $MXrec | awk ' $2 ~ "ip" {print "'$i' has address " $3} $2 ~ "mx" {print "'$i' mail is handled by " $3 " " $4} ' }