User Tools

Site Tools


eric:computer:bash:shell_scripting:shell.scripting.tput

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eric:computer:bash:shell_scripting:shell.scripting.tput [2026/10/08 20:59] – [Terminal codes (ANSI/VT100) introduction] admineric:computer:bash:shell_scripting:shell.scripting.tput [2026/10/08 21:33] (current) – [Bash examples] admin
Line 25: Line 25:
 All codes that can be used with tput can be found in terminfo(5). (on OpenBSD at least) See OpenBSD’s terminfo(5) under the Capabilities section. The cap-name is the code to use with tput, a description of each code is also provided. General useful ASCII codes All codes that can be used with tput can be found in terminfo(5). (on OpenBSD at least) See OpenBSD’s terminfo(5) under the Capabilities section. The cap-name is the code to use with tput, a description of each code is also provided. General useful ASCII codes
  
-The Ctrl-Key representation is simply associating the non-printable characters from ASCII code 1 with the printable (letter) characters from ASCII code 65 (“A”). ASCII code 1 would be ^A (Ctrl-A), while ASCII code 7 (BEL) would be ^G (Ctrl-G). This is a common representation (and input method) and historically comes from one of the VT series of terminals.  Note: The following table may have been messed up when converting to Dokuwiki, should verify it.+The Ctrl-Key representation is simply associating the non-printable characters from ASCII code 1 with the printable (letter) characters from ASCII code 65 (“A”). ASCII code 1 would be ^A (Ctrl-A), while ASCII code 7 (BEL) would be ^G (Ctrl-G). This is a common representation (and input method) and historically comes from one of the VT series of terminals.
  
-^ Name ^ decimal ^ octal ^ hex  ^ C-escape ^ Ctrl-Key                     ^ Description        ^ +^ Name ^ decimal ^ octal ^ hex  ^ C-escape ^ Ctrl-Key                     ^ Description                  ^ 
-| BEL  | 7       | 007   | 0x07 | <none>   | Ctrl-G                       | Terminal bell      | +| BEL  | 7       | 007   | 0x07 | \a       | Ctrl-G                       | Terminal bell                | 
-| BS   | 8       | 010   | 0x08 | Ctrl-H   | Backspace                    |                    | +| BS   | 8       | 010   | 0x08 | \b       | Ctrl-H                       | Backspace                    | 
-| HT   | 9       | 011   | 0x09 | Ctrl-I   | Horizontal TAB               |                    | +| HT   | 9       | 011   | 0x09 | \t       | Ctrl-I                       | Horizontal TAB               | 
-| LF   | 10      | 012   | 0x0A | <none>   | Ctrl-J                       | Linefeed (newline) | +| LF   | 10      | 012   | 0x0A | \n       | Ctrl-J                       | Linefeed (newline)           | 
-| VT   | 11      | 013   | 0x0B | Ctrl-K   | Vertical TAB                 |                    | +| VT   | 11      | 013   | 0x0B | \v       | Ctrl-K                       | Vertical TAB                 | 
-| FF   | 12      | 014   | 0x0C | Ctrl-L   | Formfeed (also: New page NP) |                    | +| FF   | 12      | 014   | 0x0C | \f       | Ctrl-L                       | Formfeed (also: New page NP) | 
-| CR   | 13      | 015   | 0x0D | Ctrl-M   | Carriage return              |                    | +| CR   | 13      | 015   | 0x0D | \r       | Ctrl-M                       | Carriage return              | 
-| ESC  | 27      | 033   | 0x1B | <none>   | Ctrl-[                       | Escape character   | +| ESC  | 27      | 033   | 0x1B | <none>   | Ctrl-[                       | Escape character             | 
-| DEL  | 127     | 177   | 0x7F | <none>   | <none>                       | Delete character   |+| DEL  | 127     | 177   | 0x7F | <none>   | <none>                       | Delete character             |
  
 ===== Cursor handling ===== ===== Cursor handling =====
Line 251: Line 251:
 MORE INFO <code>tput cols</code> gives terminal columns <code>tput lines</code> gives you number of rows MORE INFO <code>tput cols</code> gives terminal columns <code>tput lines</code> gives you number of rows
  
-Source: http://wiki.bash-hackers.org/scripting/terminalcodes+Source: http://wiki.bash-hackers.org/scripting/terminalcodes \\ 
 +Original source now offline, try: https://web.archive.org/web/20221019084419/https://wiki.bash-hackers.org/scripting/terminalcodes
  
  
eric/computer/bash/shell_scripting/shell.scripting.tput.1791493141.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki