summaryrefslogtreecommitdiff
path: root/scripts/hex2dec
blob: bf5d82d0be6923de71b42f9358d0eafec5ef0222 (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 ./scripts/hex2dec.d/"$(cat)"
 fi
)