Skip to content
Snippets Groups Projects
Commit e239a68c authored by Michael Marsh's avatar Michael Marsh
Browse files

added ; && and ||

parent 0e1de454
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -314,6 +314,17 @@ other things we've seen:
Control Flow
------------
The simplest form of control flow uses boolean operators to combine
commands
| *Combination* | *Execution* |
| ------------- | ----------- |
| `foo ; bar` | Execute `foo`, then execute `bar` |
| `foo && bar` | Execute `foo`; if successful execute `bar` |
| `foo || bar` | Execute `foo`; if *not* successful execute `bar` |
The return status is always the status of the last command executed.
Bash has an if/then/elif/else/fi construction. The minimal version is
if/then/fi, as in:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment