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

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

for x in $(echo -n "$1" | tr . ' ') ; do
`dirname "$0"`/dec2hex "$x"
done | tr '\n' / | head -c -1 ; echo