simple/tiny/fqdn

10 lines
226 B
Plaintext
Raw Normal View History

2000-01-11 14:24:36 +01:00
#!/bin/sh
[ $# -ge 2 ] && { echo "Usage: $0 [hostname]" >&2; exit 1 }
if [ $# -eq 1 ]
then
hostname=$1
else
hostname="`/bin/hostname`"
fi
/usr/bin/nslookup $hostname | /bin/grep Name: | /bin/sed -e 's/.* *//'