diff --git a/SC2181.md b/SC2181.md index 3b04745..361a660 100644 --- a/SC2181.md +++ b/SC2181.md @@ -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: