I want to convert a hexadecimal value to decimal value, perform some arithmetic operation and convert it back to hexadecimal. In an attempt to do so, I am facing the following error,
"myshell.sh: line 77: 16##0x00a002: invalid number (error token is "16##0x00a002")
The related line of code is:
SUBVER3_1=$((16##$SUBVER3_1))
Can someone let me know:
- What this error is and how can i fix it?
- How to perform arithmetic operations on hexadecimal numbers in shell?