I want to write bash scritpt where it will put 0 capital letters in a hexadecimal character, for example. 32b, ae2, etc., It only works with an integer, but not with a mix character and a digit. I used
printf "%04d$a\n" . a=ae2.
what i want looks like this: 0ab3, 003s, 000a, 002a padding
source
share