Back to Playground

ASCII table

All 128 ASCII characters in decimal, hex, octal, binary and HTML, with notes on what they do in a shell script.

ChrDecHexOctBinHTMLDescription
NULNullEnds a C string, and splits find -print0 output.
SOHStart of heading
STXStart of text
ETXEnd of textCtrl+C, sends SIGINT.
EOTEnd of transmissionCtrl+D, ends input or closes the shell.
ENQEnquiry
ACKAcknowledge
BELBellMakes the terminal beep.
BSBackspaceMoves the cursor one step back.
TABHorizontal tabThe default IFS, with space and newline.
LFLine feedThe newline on Linux and macOS.
VTVertical tab
FFForm feedCtrl+L, clears the screen.
CRCarriage returnWindows ends lines with CR LF, the cause of $'\r': command not found.
SOShift out
SIShift in
DLEData link escape
DC1Device control 1Ctrl+Q, XON, resumes output.
DC2Device control 2Ctrl+R, reverse history search.
DC3Device control 3Ctrl+S, XOFF, freezes output.
DC4Device control 4
NAKNegative acknowledgeCtrl+U, deletes to the start of the line.
SYNSynchronous idle
ETBEnd of transmission blockCtrl+W, deletes the word before the cursor.
CANCancel
EMEnd of medium
SUBSubstituteCtrl+Z, suspends the job.
ESCEscapeStarts every ANSI color code, like \e[1m.
FSFile separatorCtrl+\, sends SIGQUIT.
GSGroup separator
RSRecord separator
USUnit separator
SpaceSplits words, quote it in file names.
Exclamation markHistory expansion in an interactive shell, even inside double quotes.
Double quoteQuotes, but still expands $ and `.
Number signStarts a comment at the start of a word.
Dollar signExpands variables and $(commands).
Percent sign
AmpersandRuns in the background, && runs on success.
Single quoteQuotes everything, and cannot be escaped inside single quotes.
Left parenthesisStarts a subshell.
Right parenthesis
AsteriskGlob for any characters.
Plus sign
Comma
Hyphen-minus
Full stop
Slash
Digit 0
Digit 1
Digit 2
Digit 3
Digit 4
Digit 5
Digit 6
Digit 7
Digit 8
Digit 9
Colon
SemicolonEnds a command.
Less-than signRedirects input.
Equals sign
Greater-than signRedirects output, >> appends.
Question markGlob for one character.
At sign
Uppercase A
Uppercase B
Uppercase C
Uppercase D
Uppercase E
Uppercase F
Uppercase G
Uppercase H
Uppercase I
Uppercase J
Uppercase K
Uppercase L
Uppercase M
Uppercase N
Uppercase O
Uppercase P
Uppercase Q
Uppercase R
Uppercase S
Uppercase T
Uppercase U
Uppercase V
Uppercase W
Uppercase X
Uppercase Y
Uppercase Z
Left square bracketGlob for one character from a set, and the test command.
BackslashEscapes the next character.
Right square bracket
Caret
Underscore
BacktickThe old command substitution, prefer $( ).
Lowercase a
Lowercase b
Lowercase c
Lowercase d
Lowercase e
Lowercase f
Lowercase g
Lowercase h
Lowercase i
Lowercase j
Lowercase k
Lowercase l
Lowercase m
Lowercase n
Lowercase o
Lowercase p
Lowercase q
Lowercase r
Lowercase s
Lowercase t
Lowercase u
Lowercase v
Lowercase w
Lowercase x
Lowercase y
Lowercase z
Left curly bracketBrace expansion, like {1..10}.
Vertical barPipes output to the next command.
Right curly bracket
TildeExpands to $HOME at the start of a word.
DELDeleteWhat the Backspace key sends in most terminals.

Good to know