rdns 127 B

123456
  1. #!/bin/bash
  2. # Do reverse DNS lokup
  3. myhostname=`host $1`
  4. if [ "$?" -eq 0 ]; then
  5. echo `echo $myhostname | cut -d " " -f 5`
  6. fi