Created SC2110 (markdown)

koalaman
2015-08-15 22:18:46 -07:00
parent e084a8cfda
commit 1d098c420e

17
SC2110.md Normal file

@@ -0,0 +1,17 @@
## "In [[..]], use || instead of -o.
### Problematic code:
[[ "$1" = "-v" -o "$1" = "-help" ]]
### Correct code:
[[ "$1" = "-v" || "$1" = "-help" ]]
### Rationale:
`-o` for logical OR is not supported in a `[[ .. ]]` expression. Use `||` instead.
### Exceptions:
None.