Special Characters
Several characters have special meaning to the shell.
Character(s) | Description |
|---|---|
| Filename pattern matching and expansion |
| Variable reference |
| Pipe |
| Input and output redirection |
| History reference and quick substitution |
| Background execution |
| Command separator |
| Argument separator |
| Filename completion (tcsh) |
| Filename completion (csh) |
| Subshell execution |
| Command substitution |
| Quote characters |
Special Characters in Filenames
Filename arguments can contain the following special characters in order to do pattern matching or home-directory substitution.
Character(s) | Description |
|---|---|
| Match an arbitrary length sequence of characters |
| Match a single character |
| Match any character named between brackets |
| Match any character not named between brackets (tcsh only) |
| Match filenames not matching |
| String expansion operator |
| Expands to pathname of your home directory |
| Expands to pathname of home directory for user |
Quote Characters
Quote characters turn off any special meaning a character has, allowing it be used as an ordinary character.
Character(s) | Description |
|---|---|
| Quote the following character. |
| Quote the characters between single quotes. |
| Quote the characters between double quotes. |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access