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,738
  • 21
  • 105
  • 131
Carla
  • 3,064
  • 8
  • 36
  • 65

0 Answers0