diff --git a/SC2039.md b/SC2039.md index ea47c30..ee01bb4 100644 --- a/SC2039.md +++ b/SC2039.md @@ -106,7 +106,7 @@ printf '%s' "$g" | grep aaa # since we want to avoid `echo` ### echo flags -See https://unix.stackexchange.com/tags/echo. +See https://unix.stackexchange.com/tags/echo/info. ### `${var/pat/replacement}` @@ -120,6 +120,8 @@ POSIX: ```sh echo "$TERM" | sed -e 's/-256.*$//g' +# Special case for this since we are matching the end: +echo "${TERM%-256*}" ``` ### `printf %q`