Merge branch 'master' of github.com:dylanaraps/pure-bash

This commit is contained in:
Dylan Araps
2018-06-16 09:14:20 +10:00

View File

@@ -1088,10 +1088,12 @@ f()for i in "$@"; do echo "$i"; done
```shell
# One line
# Note: The 3rd statement may run when the 1st is true
[[ "$var" == hello ]] && echo hi || echo bye
[[ "$var" == hello ]] && { echo hi; echo there; } || echo bye
# Multi line (no else, single statement)
# Note: The exit status may not be the same as with an if statement
[[ "$var" == hello ]] && \
echo hi