Questions tagged [escape-characters]

Escape sequences such as encodings of terminal commands and function keys

Escape characters allow special functions to be represented in what would otherwise be an ordinary text. Use this tag, in particular, for escape sequences that begin with the ESC (\e, \033, \x1b, ␛) character to encode terminal commands and function keys.

For ways to prevent special characters from having a special meaning in regular expressions, shell scripts, etc., use the tag instead.

Further reading

460 questions
7
votes
1 answer

What's the maximum length for a multibyte escape sequence?

ESC sends \x1b. That's 1 byte: the actual escape character. Page Up sends \x1b[H. That's 3 bytes. F2 sends \x1b[OQ. That's 4 bytes. F5 sends \x1b[15~. That's 5 bytes. What's the maximum length for one of these? Is this documented somewhere?
cat
  • 3,468
  • 4
  • 23
  • 51
2
votes
2 answers

How to distinguish reply from the terminal from user input?

For example, in a program I want to get current cursor position on terminal (tput u7 or \E[6n on xterm): CSI P s n P s = 6 → Report Cursor Position (CPR) [row;column] as CSI r ; c R I write this sequence to standard output in my program. After…
1
vote
1 answer

Compose key sequences for Ǝ and ə?

/usr/share/X11/locale/en_US.UTF-8/Compose (Ubuntu 18.04) defines compose sequences for accented variations of the turned "e" character: : "Ǝ́" # LATIN CAPITAL LETTER TURNED E WITH ACUTE
0
votes
1 answer

double quote single quote combination BCP on Linux

Can someone show me the correct way to structure this command? FYI - I think this boils down to an escape issue. There are several posts close but I have yet to find a solution which will run as a command (example) This command queries the db to…