Created SC1019 (markdown)

Vidar Holen
2018-10-10 20:50:23 -07:00
parent 7458bfd3d9
commit 47af5dbe29

28
SC1019.md Normal file

@@ -0,0 +1,28 @@
## Expected this to be an argument to the unary condition.
### Problematic code:
```sh
[ -x ]
```
### Correct code:
```sh
[ -x "myfile" ]
```
### Rationale:
ShellCheck has found a unary test operator that does not appear to be followed by a valid shell word.
This could be because of a misplaced `]`, `)`, or a missing space before the `]`.
Check the syntax, make sure the test operator has an operand, and try again.
### Exceptions:
None.
### Related resources:
* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!