diff --git a/bash.pdf b/bash.pdf index 322ffe69b9329623d848e14fdfd8695525b26d29..a0168b86eb329e5ebf22c51bd1c915b1c32162ef 100644 Binary files a/bash.pdf and b/bash.pdf differ diff --git a/bash.txt b/bash.txt index 9ee29e104fe3efc0e6878b891d5ce8919f33f1d3..2b6e6bc765eea393f0ebb47889a0cf5ed52d992d 100644 --- a/bash.txt +++ b/bash.txt @@ -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: