diff --git a/SC2181.md b/SC2181-tell-inverting-return-value-will-overwrite-it.md similarity index 96% rename from SC2181.md rename to SC2181-tell-inverting-return-value-will-overwrite-it.md index f09c148..9191825 100644 --- a/SC2181.md +++ b/SC2181-tell-inverting-return-value-will-overwrite-it.md @@ -33,7 +33,7 @@ Apart from the redundancy, there are other reasons to avoid this pattern: To check that a command returns success, use `if mycommand; then ...`. -To check that a command returns failure, use `if ! mycommand; then ...`. +To check that a command returns failure, use `if ! mycommand; then ...`. Notice that `!` will overwrite `$?` value. To additionally capture output with command substitution: `if output=$(mycommand); then ...`