diff options
author | makefu <github@syntax-fehler.de> | 2015-08-28 23:39:37 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2015-08-28 23:39:37 +0200 |
commit | e5c6eae9896aeda68204bb7010a6e4e26d7eaca1 (patch) | |
tree | 0dcc367de6f6c1d978cabe3c3275395b1a1757b3 /Reaktor/reaktor/commands/taken | |
parent | 60367f4b7bf02b8c2ec074c5ccba6772d175caa9 (diff) |
Reaktor: add nix support, packaging
Diffstat (limited to 'Reaktor/reaktor/commands/taken')
-rwxr-xr-x | Reaktor/reaktor/commands/taken | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Reaktor/reaktor/commands/taken b/Reaktor/reaktor/commands/taken new file mode 100755 index 00000000..b8beba68 --- /dev/null +++ b/Reaktor/reaktor/commands/taken @@ -0,0 +1,28 @@ +#!/bin/sh +#!/bin/bash + +# domainavailable +# Fast, domain name checker to use from the shell +# Use globs for real fun: +# domainavailable blah{1..3}.{com,net,org,co.uk} +# Inspired by foca / giles: +# http://gilesbowkett.blogspot.com/2009/02/simple-bash-domain-availability.html + +for d in $@; +do +if host "$d" | grep "NXDOMAIN" >&/dev/null; then + w=$(whois "$d") + if ! test "$?" -eq 0 ;then + echo "$d - whois not available" + elif echo "$w" | grep -Ei "(No match|NOT FOUND|Status: free)" >&/dev/null; then + echo "$d available"; + elif echo "$w"| grep -Ei "(Status: invalid)" >&/dev/null ;then + echo "$d invalid" + else + echo "$d taken"; + fi +else + echo "$d taken"; +fi +done +exit 0 |