You can convert in many ways, within bash, and relatively easily.
To convert a number from hexadecimal to decimal:
$ echo $((0x15a))
346
$ printf '%d\n' 0x15a
346
$ perl -e 'printf ("%d\n", 0x15a)'
346
$ echo 'ibase=16;obase=A;15A' | bc
346
source
to share