Extended Ascii in Linux

Benjamin picture Benjamin · Apr 7, 2011 · Viewed 20.1k times · Source

How would I print these characters in Linux?

│ (ascii 179)

├ (ascii 195)

└ (ascii 192)

─ (ascii 196)

I cannot find any octal values that would work with echo -e "\0xxx", any ideas?

Answer

drysdam picture drysdam · Apr 7, 2011

After much poring over man printf and info printf, I think I've gotten this to work.

The basic issue seems to be that bash has a built-in printf that doesn't work. And, despite what the man/info pages, say, \U doesn't work. \u still does, though.

env printf '\u2502'

gets me a vertical box character.