Advertisement
opexxx

hostname IP grep

Jul 24th, 2013
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ more grepHref.sh
  2. grep "href" index.html | cut -d '/' -f3 | sort -u > ips.txt
  3.  
  4. $ more hostname.sh
  5. #!/bin/bash
  6. ##to check bundles of ip in ips.txt
  7. for hostname in $(cat ips.txt); do
  8. host $hostname | egrep "has address|is an alias"
  9. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement