#First way to convert to ascii code printf "x$(printf %x 65)" #Second way to convert to ascii code set $(printf %x 65) printf "x$1" #Third way to convert to ascii code awk 'BEGIN{printf "%c", 65}'