Created SC1029 (markdown)

koalaman
2017-06-03 11:44:36 -07:00
parent a3f0489729
commit 17f256db3d

21
SC1029.md Normal file

@@ -0,0 +1,21 @@
## In `[[..]]` you shouldn't escape `(` or `)`.
### Problematic code:
```sh
[[ -e ~/.bashrc -a \( -x /bin/dash -o -x /bin/ash \) ]]
```
### Correct code:
```sh
[[ -e ~/.bashrc -a ( -x /bin/dash -o -x /bin/ash ) ]]
```
### Rationale:
You don't have to -- and can't -- escape `(` or `)` inside a `[[ .. ]]` expression like you do in `[ .. ]`. Just remove the escaping.
### Exceptions:
None.