From 3f9c06b6b3785af65f5bfa3fb9d6d870c8307aae Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Tue, 29 Jul 2025 20:48:08 +0900 Subject: [PATCH] Updated SC2116 (markdown) --- SC2116.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SC2116.md b/SC2116.md index 49de839..43387b4 100644 --- a/SC2116.md +++ b/SC2116.md @@ -25,7 +25,7 @@ You can just replace `$(echo myvalue)` with `myvalue`. ### Exceptions Sometimes this pattern is used because of side effect of `echo` or expansions. For example, here `$(echo ..)` is used to expand a glob. -``` +```sh glob="*.png" files="$(echo $var)" ``` @@ -39,7 +39,7 @@ The `echo` is not useless, but this code is problematic because it concatenates All three methods will let you avoid issues with special characters in filenames. As another example, here `$(echo ..)` is used to expand escape sequences: -``` +```sh unexpanded='var\tvalue' expanded="$(echo "$var")" ```