summaryrefslogtreecommitdiff
path: root/scripts/cidr2hex
blob: 7a845224f7b7f55313eea900ce6ac2078745762c (plain) (blame)
1
2
3
4
5
6
7
8
9
#!/bin/sh

if [ x"$1" = x ]; then
 echo "Usage: $0 <cidr>" >&2; exit 255
fi

dn=$(dirname "$0")
ip=$("$dn"/cidr2ip "$1") || exit 1
"$dn"/ip2hex "$ip"