Created SC1027 (markdown)

Vidar Holen
2022-10-19 20:12:26 -07:00
parent e34cb9e13c
commit 55de550a4b

24
SC1027.md Normal file

@@ -0,0 +1,24 @@
## Expected another argument for this operator.
### Problematic code:
```sh
[ $a -ne ]
```
### Correct code:
```sh
[ $a -ne $b ]
```
### Rationale:
ShellCheck found a `test` operator without an operand. This could be a copy-paste fail, bad linebreak, or trying to use `<>` instead of `!=` or `-ne`.
### Exceptions:
None.
### Related resources:
* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!