summaryrefslogtreecommitdiff
path: root/scripts/hex2dec
blob: 1a59f5ad8d2959b085e21e422467edc481a89ad1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
(
 if [ x"$USE_BC" = x1 ]; then
  echo -n "ibase=16; "
 fi
 if [ x"$1" = x ]; then
  cat
 else
  echo "$1"
 fi
) | (
 if [ x"$USE_BC" = x1 ]; then
  bc -q
 else
  cat `dirname "$0"`/hex2dec.d/"$(cat)"
 fi
)