|
Not sure where 97 came from for "A". maybe you mean lower case "a".
See: man ascii .
A = 101 in octal
A = 41 in hexadecimal
A = 65 in decimal
a = 141 in octal
a = 61 in hexadecimal
a = 97 in decimal
If you actually mean lower case a, you can use "bc" to change number bases from decimal to octal then use shell echo to display the character.
#!/bin/ksh
CHAR=97
OCT=`echo "obase=8;ibase=10;${CHAR}"|bc`
echo "\0${OCT}"
a
|