mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2181 (markdown)
@@ -35,6 +35,8 @@ To check that a command returns success, use `if mycommand; then ...`.
|
||||
|
||||
To check that a command returns failure, use `if ! mycommand; then ...`.
|
||||
|
||||
To additionally capture output with command substitution: `if output=$(mycommand); then ...`
|
||||
|
||||
This also applies to `while`/`until` loops.
|
||||
|
||||
### Exceptions:
|
||||
|
Reference in New Issue
Block a user