Skip to content

Instantly share code, notes, and snippets.

@hrbrmstr
Created September 10, 2013 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hrbrmstr/6503558 to your computer and use it in GitHub Desktop.
Save hrbrmstr/6503558 to your computer and use it in GitHub Desktop.
Given a list of IP addresses, perform a reverse lookup and return the original IP address and the resolved FQDN (if any)
# "dig" needs to be on your system and in the execution path for this to work
resolved = sapply(ip.list, function(x) system(sprintf("dig -x %s +short",x), intern=TRUE))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment