Skip to content

Instantly share code, notes, and snippets.

@itochan
Created May 4, 2017 13:43
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 itochan/c2f6263b54395e78f03f6fcc83c9a86d to your computer and use it in GitHub Desktop.
Save itochan/c2f6263b54395e78f03f6fcc83c9a86d to your computer and use it in GitHub Desktop.
ホスト名を正引きして逆引きする関数
ptrhost () {
host $1 | grep -v mail >&2 | rev | cut -d' ' -f1 | rev | xargs -I{} host {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment