diff --git a/dig_query.sh b/dig_query.sh new file mode 100755 index 0000000..105e307 --- /dev/null +++ b/dig_query.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [[ "$1" == "--help" || "$1" == "-h" ]]; then + echo "Usage: ${0} [domain] [record_type]" + exit +fi + +if [[ -n "$1" ]]; then + if [[ -n "$2" ]]; then + dig @127.0.0.1 -p 13337 "$1" "$2" +retry=0 + else + dig @127.0.0.1 -p 13337 "$1" A +retry=0 + fi +else + dig @127.0.0.1 -p 13337 "git.comff.net" A +retry=0 +fi