bash

Find hostname fro IP lists

for LINE in `cat ./ips.txt`
do
  echo "Got [$LINE]"
  nslookup $LINE
done | grep "name =" | cut -d = -f 2