Updated SC2181 (markdown)

Sami Kerola
2018-06-18 22:38:57 +01:00
parent 63ecd1aa3e
commit deccfb5aab

@@ -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 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 ...` To additionally capture output with command substitution: `if output=$(mycommand); then ...`