mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Created SC1027 (markdown)
24
SC1027.md
Normal file
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!
|
Reference in New Issue
Block a user