Special Characters

Appendix: B

Shell Special Characters

Character Description
# comment
\ escape special meaning of the special character and to code escape sequences like tab \t, newline \n, etc…
\n marks end of a command and shell start executing the command(s)
space delimiter of command, options and arguments in a command sequence
\t same as the space / blank character
$ prefix used in the variable names to get the values referenced by the variables
! used as a prefix in shortcuts to retrive / reuse previously run commmands and to negate the return code of a command that follows the !
Character Description
* wildcard: represents zero or more characters
? wildcard: represents zero or one character
[…] wildcard: represents characterset
{} brace expansion
Character Description
/ represents the root directory and the path separator
~ represents current user’s home directory
Character Description
' single qoute; also known as strong quote
" double qoute; also known as weak quote
` backtick: treats everyting inside as command, executes and returns the result. This is old style, use $(cmd) instead
Character Description
& submit command in background mode
; run multiple commands with ; as delimiter
() submit commands as a sub-process
{} wrap multiple commands together as a block of commands to facilitate output redirection
Character Description
< redirection: input to command from a file
> redirection: output of command to a file
| redirection: output of command to another command. we can chain multiple commands using the |