summaryrefslogtreecommitdiff
path: root/getsrv
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2020-01-30 00:37:43 -0600
committerepoch <epoch@hacking.allowed.org>2020-01-30 00:37:43 -0600
commit3f98b2883c0b71a053584c7647321536236289b0 (patch)
treea07b06bd96fee2d2d727c05b680e23053cc5f326 /getsrv
parent01177da959edddc5718d8edbe3e4f76a0371e0fd (diff)
downloaduritools-3f98b2883c0b71a053584c7647321536236289b0.tar.gz
uritools-3f98b2883c0b71a053584c7647321536236289b0.zip
commented out stuff that went to stderr in getsrv
Diffstat (limited to 'getsrv')
-rwxr-xr-xgetsrv6
1 files changed, 3 insertions, 3 deletions
diff --git a/getsrv b/getsrv
index 019cdf0..62f4f5c 100755
--- a/getsrv
+++ b/getsrv
@@ -14,10 +14,10 @@ else
fi
if which dig >/dev/null;then
dig +short -t SRV "$record"
- echo "after dig" >&2
+ #echo "after dig" >&2
elif which host >/dev/null;then
host -t SRV "$record" | cut '-d ' -f5-
- echo "after host" >&2
+ #echo "after host" >&2
else
echo "how am I supposed to get a srv record without dig or host? giving up." >&2
exit 1
@@ -32,6 +32,6 @@ fi | grep '^[0-9][0-9]* [0-9][0-9]*' \
| cut '-d ' -f2- \
| awk '{for(i=0;i<=$1;i++) {print $0} }' \
| cut '-d ' -f2- \
- | shuf \
+ | shuf 2>/dev/null \
| head -n1 \
## that last pipeline tries to get pretty close to printing a properly weighted response, but not perfect.