From 91a8cee50c9cce580534b8cc6ca31265029ef6d2 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 12 May 2010 21:29:59 +0000 Subject: scripts for dom&ip, dn42 resdb, and doc (www.anonet2.org) --- scripts/dec2hex | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/dec2hex (limited to 'scripts/dec2hex') diff --git a/scripts/dec2hex b/scripts/dec2hex new file mode 100755 index 0000000..e997b20 --- /dev/null +++ b/scripts/dec2hex @@ -0,0 +1,21 @@ +#!/bin/sh +( + if [ x"$USE_BC" = x1 ]; then + echo -n "obase=16; " +#echo 'obase=16;if (last<16) 0; 10;' | bc + fi + if [ x"$1" = x ]; then + cat + else + echo "$1" + fi +) | ( + if [ x"$USE_BC" = x1 ]; then + ( + echo -n 0 + bc -q + ) | tail -c3 + else + cat ./scripts/dec2hex.d/"$(cat)" + fi +) -- cgit v1.2.3