Character | Meaning |
; | Command separator |
& | Background execution |
() | Command grouping |
│ | Pipe |
< > & | Redirection symbols |
* ? [ ] ~ + - @ ! | Filename metacharacters |
" ' / | Used in quoting other characters |
` | Command substitution |
$ | Variable substitution (or command or arithmetic substitution) |
# | Start a comment that continues to the end of the line |
space tab newline | Word separators |
Sequence | Availability | Value |
\a | All | ASCII BEL (visual or audible alert) |
\b | All | Backspace |
\e | All | Escape |
\E | All | Escape |
\f | All | Formfeed |
\n | All | Newline |
\r | All | Carriage return |
\t | All | Tab |
\uHHHH | All | Unicode character HHHH |
\v | All | Vertical tab |
\xHH | All | Hexadecimal value HH |
\` | $'...' | Single quote |
\" | $'...' | Double quote |
\? | $'...' | Question mark |
\\ | $'...' | Backslash |
prompt> echo 'Single quotes "protect" double quotes'
Single quotes "protect" double quotes
prompt> echo "Well, isn’t that \"special\"?"
Well, isn’t that "special"?
prompt> echo "You have `ls | wc -l` files in `pwd`"
You have 43 files in /home/bob
prompt> echo "The value of \$x is $x"
The value of $x is 100
prompt> echo $'A\tB'
A B