diff options
author | cathugger <cathugger@cock.li> | 2017-03-10 03:30:16 +0000 |
---|---|---|
committer | cathugger <cathugger@cock.li> | 2017-03-10 03:30:16 +0000 |
commit | 7e5469a0dee1fbaf661720fc330d47d992f1d8fe (patch) | |
tree | d5f8a16a1ae8e390103e35a77d975e3157115236 /scripts/cidr2hex | |
parent | 9ec38bd2c56d112e49360c4f8be92900c998205c (diff) | |
download | resdb-7e5469a0dee1fbaf661720fc330d47d992f1d8fe.tar.gz resdb-7e5469a0dee1fbaf661720fc330d47d992f1d8fe.zip |
add muh nameserver, some script tweaks
Diffstat (limited to 'scripts/cidr2hex')
-rwxr-xr-x | scripts/cidr2hex | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/cidr2hex b/scripts/cidr2hex index 36974e0..7a84522 100755 --- a/scripts/cidr2hex +++ b/scripts/cidr2hex @@ -4,4 +4,6 @@ if [ x"$1" = x ]; then echo "Usage: $0 <cidr>" >&2; exit 255 fi -./scripts/ip2hex "$(./scripts/cidr2ip "$1")" +dn=$(dirname "$0") +ip=$("$dn"/cidr2ip "$1") || exit 1 +"$dn"/ip2hex "$ip" |