diff --git a/NOTES.md b/NOTES.md index 7aa1297..6041f6c 100644 --- a/NOTES.md +++ b/NOTES.md @@ -67,7 +67,7 @@ The first **word** specifies a command to be executed, with the rest of the The return status (see _Exit Status_) of a simple command is its exit status as provided by the POSIX 1003.1 waitpid function, or 128+n if the command was -terminated by signal n. +terminated by signal n. #### Pipelines @@ -76,7 +76,7 @@ cf. 3.2.3 Pipelines A pipeline is a sequence of one or more commands separated by the control operator '|'. The output of each command in the pipeline is connected via a pipe to the input -of the next command. +of the next command. That is, each command reads the previous command’s output. This connection is performed before any redirections specified by the first command. @@ -106,7 +106,7 @@ A list is a sequence of one or more pipelines separated by one of the **operators** ‘&&’, or ‘||’, and optionally terminated by a newline. AND and OR lists are sequences of one or more pipelines separated by the control -operators ‘&&’ and ‘||’, respectively. +operators ‘&&’ and ‘||’, respectively. AND and OR lists are executed with left associativity. e.g. @@ -144,7 +144,7 @@ executed in the list. cf. 3.2.5 Compound Commands -Each group begins with the **control operator** '(' and ends with the +Each group begins with the **control operator** '(' and ends with the **control operator** ')'. Any redirections associated with a _group of commands_ apply to all commands @@ -183,7 +183,7 @@ order: * command substitution (left to right) * word splitting * filename expansion - + We only have to implement the following kinds: * parameter expansion * word splitting @@ -253,7 +253,7 @@ cf. 3.5.8.1 Pattern Matching Any character that appears in a pattern, other than the special pattern characters described below, matches itself. The NUL character may not occur in -a pattern. +a pattern. The special pattern characters have the following meanings: '\*' @@ -281,11 +281,11 @@ expansions are removed. cf. 3.7.3 Command Execution Environment -The shell has an execution environment, which consists of the following: +The shell has an execution environment, which consists of the following: open files inherited by the shell at invocation, as modified by redirections -the current working directory as set by cd or inherited by the shell at invocation +the current working directory as set by cd or inherited by the shell at invocation shell variables, passed in the environment @@ -310,8 +310,8 @@ delimiter is the result of quote removal on word, and the lines in the here-document are not expanded. If word is unquoted, all lines of the here-document are subjected to parameter expansion, command substitution, and arithmetic expansion, the character sequence \newline is ignored, and ‘\’ must -be used to quote the characters ‘\’, ‘$’, and ‘`’. - +be used to quote the characters ‘\’, ‘$’, and ‘`’. + ## Definitions cf. [Bash Reference Manual](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Definitions) cf. 2 Definitions @@ -322,16 +322,16 @@ word or an operator **word** A sequence of characters treated as a unit by the shell. Words may not include -unquoted metacharacters. +unquoted metacharacters. **operator** A **control operator** or a **redirection operator**. Operators contain at least one unquoted **metacharacter**. **control operator** -A token that performs a control function. +A token that performs a control function. -It is a newline or one of the following: '|', ‘||’, ‘&&’, ‘(’, or ‘)’. +It is a newline or one of the following: '|', ‘||’, ‘&&’, ‘(’, or ‘)’. **redirection operator** For our project: