Syntax
This
subsection describes the many symbols peculiar to
bash
. The topics are arranged as follows:
Special files
Filename metacharacters
Command-line editing
Quoting
Command forms
Redirection forms
Coprocesses
Special Files
File |
Purpose |
---|---|
/etc/profile |
Executed automatically at login. |
$HOME/.bash_profile |
Executed automatically at login. |
$HOME/.bashrc |
Executed automatically at shell startup. |
$HOME/.bash_logout |
Executed automatically at logout. |
$HOME/.bash_history |
Record of last session’s commands. |
$HOME/.inputrc |
Initialization file for reading input in an interactive shell. |
/etc/passwd |
Source of home directories for |
Filename Metacharacters
Characters |
Meaning |
---|---|
|
Match any string of zero or more characters. |
|
Match any single character. |
|
Match any one of the enclosed characters; a hyphen can be used to specify a range (e.g., a-z, A-Z, 0-9). |
|
Match any character not among the enclosed characters. |
|
Same as
|
|
Brace expansion: match any of the enclosed strings. |
|
Home directory of user name. With no name, Home directory of current user. |
|
Current working directory (PWD). |
|
Previous working directory from directory stack (OLDPWD; see also the
|
|
The nth entry in the directory stack, counting from the start of the list with the first entry being 0. |
|
The nth entry in the directory stack, counting from ... |
Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.