Created
January 20, 2022 00:29
-
-
Save ctrlaltdev/28d8bfd98a8c08dd6c656a69eb1ee7ac to your computer and use it in GitHub Desktop.
Basic Bash Script to compare DNS records between the default NS and a provided one - used to make sure I copied all the records with the correct values before changing the NS servers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
DOMAIN=$1 | |
NS=$2 | |
TYPE=$3 | |
ORIG_SOA=$(dig SOA $1 | awk '{print $5}') | |
COMP_SOA=$(dig SOA $1 @$2 | awk '{print $5}') | |
echo -en "$ORIG_SOA\t" | |
dig $3 $1 | |
echo -en "$COMP_SOA\t" | |
dig $3 $1 @$2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment