summaryrefslogtreecommitdiff
path: root/scripts/hex2dec
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/hex2dec')
-rwxr-xr-xscripts/hex2dec9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/hex2dec b/scripts/hex2dec
new file mode 100755
index 0000000..7b66be9
--- /dev/null
+++ b/scripts/hex2dec
@@ -0,0 +1,9 @@
+#!/bin/sh
+(
+ echo -n "ibase=16; "
+ if [ x"$1" = x ]; then
+ cat
+ else
+ echo "$1"
+ fi
+) | bc -q