From 91049dd56c68466844ece246462ea8df5afb4414 Mon Sep 17 00:00:00 2001 From: koalaman Date: Wed, 25 Jan 2017 10:39:13 -0800 Subject: [PATCH] Updated SC2181 (markdown) --- SC2181.md | 2 ++ 1 file changed, 2 insertions(+) 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: