Mercurial > hg > anonet-resdb
annotate scripts/ip2hex @ 229:57a9c660edd5 draft
Added AS1112 for UCIS Anortr2
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Wed, 27 Oct 2010 18:21:36 +0200 |
parents | 31e3b4edf502 |
children | 2f57d4d36759 |
rev | line source |
---|---|
19
31e3b4edf502
scripts for dom&ip, dn42 resdb, and doc (www.anonet2.org)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
1 #!/bin/sh |
31e3b4edf502
scripts for dom&ip, dn42 resdb, and doc (www.anonet2.org)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
2 |
31e3b4edf502
scripts for dom&ip, dn42 resdb, and doc (www.anonet2.org)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
3 if [ x"$1" = x ]; then |
31e3b4edf502
scripts for dom&ip, dn42 resdb, and doc (www.anonet2.org)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
4 echo "Usage: $0 <IP>" >&2; exit 255 |
31e3b4edf502
scripts for dom&ip, dn42 resdb, and doc (www.anonet2.org)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
5 fi |
31e3b4edf502
scripts for dom&ip, dn42 resdb, and doc (www.anonet2.org)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
6 |
31e3b4edf502
scripts for dom&ip, dn42 resdb, and doc (www.anonet2.org)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
7 for x in $(echo -n "$1" | tr . ' ') ; do |
31e3b4edf502
scripts for dom&ip, dn42 resdb, and doc (www.anonet2.org)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
8 ./scripts/dec2hex "$x" |
31e3b4edf502
scripts for dom&ip, dn42 resdb, and doc (www.anonet2.org)
Nick <nick@somerandomnick.ano>
parents:
diff
changeset
|
9 done | tr '\n' / | head -c -1 ; echo |