From 56fe9781b40863d2ac5d5e07bfd88b2ffd744900 Mon Sep 17 00:00:00 2001 From: Mingye Wang Date: Thu, 11 Jun 2020 18:53:25 +0800 Subject: [PATCH] Updated SC2015 (markdown) --- SC2015.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SC2015.md b/SC2015.md index a7809a1..b7f6edd 100644 --- a/SC2015.md +++ b/SC2015.md @@ -31,14 +31,13 @@ If an `if` clause is used instead, this problem is avoided. ### Boring detail: - We can think of the example above as ```sh ((([[ $dryrun ]]) && echo "Would delete file") || rm file) ``` expressing the left-associativity of the `&&` `||` operators. -Whenever a command (strictly, a pipeline) succeeds or fails, the execution proceeds following the next `&&` (for success) or `||` (for failure). +Whenever a command (strictly, a pipeline) succeeds or fails, the execution proceeds following the next `&&` (for success) or `||` (for failure). (More strictly, the parentheses should be replaced with `{ command; }` to avoid making a subshell, but that's ugly and boring.) ### Exceptions Ignore this warning when you actually do intend to run C when either A or B fails.