All Questions
1
question
1
vote
2
answers
1k
views
Unable to store ascii value in a variable
I am trying to convert hex to decimal to ascii and store it in a variable.
I am using the following code.
HEX=30
DEC=`printf "%d\n" 0x${HEX}`
echo "$DEC"
ASC=`printf \\$(printf '%03o' $DEC)`
echo "$...