blob: 9194d0125f445d810e803776b1ea93f142e39b22 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
# maybe use? not sure if this would break anything. : printf "%02X" $1
(
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
)
|