#!/bin/bash #Copyright 2002 William Stearns #Released under the GPL. CommandLine='no' while [ -n "$1" ]; do host -t PTR "$1" 2>/dev/null | grep 'domain name pointer' | sed -e 's/.*domain name pointer //' CommandLine='yes' shift done if [ "$CommandLine" = 'no' ]; then while read IPS ; do set $IPS while [ -n "$1" ]; do host -t PTR "$1" 2>/dev/null | grep 'domain name pointer' | sed -e 's/.*domain name pointer //' shift done done fi