# non-commercial use provided that this notice appears in # all copies of the file. There is no warranty, either # expressed or implied, supplied with this code. # hex2decimal() { NUM=`echo $1 | tr '[a-f]' '[A-F]'` echo 16i $NUM p | dc }