aboutsummaryrefslogtreecommitdiff
path: root/templates/.bin/rev_dns
blob: 604774c4f869511038bf2023c0d3ee9653c0b204 (plain)
1
2
3
4
5
6
7
#!/bin/bash

if [[ "$#" != "1" ]]; then
  echo "usage: $0 <hostname>"
else
  dig +short "$1" | awk '/^([0-9]{1,3}\.){3}[0-9]{1,3}$/{print $0}' | xargs -I _ dig +short -x _
fi