summaryrefslogtreecommitdiff
path: root/scripts/ip2hex
blob: 2c8ce367020d903bf185d58f03db6ea05bf3e3fb (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
 ./scripts/dec2hex "$x"
done | tr '\n' / | head -c -1 ; echo