Syntax and description
See also
In order of decreasing precedence:
Operator | Meaning |
---|---|
( ) |
Grouping |
> >! >& >&! >> >>! >>& >>&! < << |
|
| |& |
Piping (stdout only or stdout + stderr) between concurrent operations |
& |
At the end of a statement, execute the statement as a background thread or process |
&& || |
Conditional execution: only run the second statement if the first succeeds (zero return code) or only if the first fails (non-zero return code) |
; |
Serial execution |
The grammar is completely recursive, so statements of arbitrary complexity can be freely nested, conditionally executed, piped or redirected.
Basic statements
I/O redirection
Expression operators
Order of evaluation
Tutorial: Programming constructs
Tutorial: I/O redirection and piping
Tutorial: Expressions