Last active
October 6, 2016 08:09
-
-
Save eru/af17e91d769aba64e74d0a6472338656 to your computer and use it in GitHub Desktop.
This file contains 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
#! /bin/sh | |
# | |
# check-mx-record.sh | |
# Copyright (C) 2016 Kazuki Hashimoto <eru.tndl@gmail.com> | |
# | |
# Distributed under terms of the MIT license. | |
# | |
# e.g. | |
# ./check-mx-record.sh ns DOMAIN_LIST | |
# DOMAIN_LIST sample file: https://gist.github.com/b5a86150f98b3d6102d5608878ca53f0 | |
while read line | |
do | |
dig $line $1 | sed -n -e '/;; ANSWER SECTION:/,/^$/p' | |
done < $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment