In shell sometimes you may need to do the base conversion from base 10 to 16 or vice versa. Below is a response on how to convert a decimal value to hex in shell or shell script.
Source: shell – BASH base conversion from decimal to hex – Unix & Linux Stack Exchange