mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 11:19:45 +08:00
Updated SC1035 (markdown)
@@ -3,12 +3,12 @@
|
||||
### Problematic code:
|
||||
|
||||
```sh
|
||||
if ![-z foo ]; then true; fi # if the command `[-z' with args `foo', `]' is not successful..
|
||||
if ![-z foo ]; then true; fi # if command `[-z' w/ args `foo', `]' fails..
|
||||
```
|
||||
### Correct code:
|
||||
|
||||
```sh
|
||||
if ! [ -z foo ]; then true; fi # if the command `[' with args `-z'. `foo', `]' is not sucessful..
|
||||
if ! [ -z foo ]; then true; fi # if command `[' w/ args `-z'. `foo', `]' fails..
|
||||
```
|
||||
|
||||
### Rationale:
|
||||
|
Reference in New Issue
Block a user