comparison scripts/dec2hex @ 19:31e3b4edf502 draft

scripts for dom&ip, dn42 resdb, and doc (www.anonet2.org)
author Nick <nick@somerandomnick.ano>
date Wed, 12 May 2010 21:29:59 +0000
parents
children 8e01b8361e9e
comparison
equal deleted inserted replaced
18:89b5d9e83572 19:31e3b4edf502
1 #!/bin/sh
2 (
3 if [ x"$USE_BC" = x1 ]; then
4 echo -n "obase=16; "
5 #echo 'obase=16;if (last<16) 0; 10;' | bc
6 fi
7 if [ x"$1" = x ]; then
8 cat
9 else
10 echo "$1"
11 fi
12 ) | (
13 if [ x"$USE_BC" = x1 ]; then
14 (
15 echo -n 0
16 bc -q
17 ) | tail -c3
18 else
19 cat ./scripts/dec2hex.d/"$(cat)"
20 fi
21 )