diff options
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" |