0

I'm missing some characters in my keyboard, so I'd like to know how to print a character in the Bash shell using the ASCII character id. For example, the character '{' has the ASCII code 123. Using C's like syntax I've tried with:

printf("%c\n", 123);
bash: syntax error near unexpected token `"%c\n",'

How can I do it?

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
Carla
  • 2,566
  • 3
  • 26
  • 51

0 Answers0