Skip to content

Instantly share code, notes, and snippets.

@MartijnBraam
Last active August 29, 2015 14:06
Show Gist options
  • Save MartijnBraam/b2311f37da26d5f3f7bf to your computer and use it in GitHub Desktop.
Save MartijnBraam/b2311f37da26d5f3f7bf to your computer and use it in GitHub Desktop.
#!/bin/bash
host $1
IP=$(host -t A $1 | awk '{ print $NF }')
PTR=$(host $IP | awk '{ print $NF }')
echo "$1 is hosted on $PTR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment