Can someone help me to convert a hexadecimal number to decimal number in a shell script?
E.g., I want to convert the hexadecimal number bfca3000 to deci
bfca3000
Dealing with a very lightweight embedded version of busybox on Linux means many of the traditional commands are not available (bc, printf, dc, perl, python)
echo $((0x2f)) 47 hexNum=2f echo $((0x${hexNum})) 47
Credit to Peter Leung for this solution.