From ed4f7fb5cb3e0067c83624b1c3eb6e753a6f66de Mon Sep 17 00:00:00 2001 From: Mingye Wang Date: Wed, 28 Oct 2015 01:13:23 -0400 Subject: [PATCH] Updated SC2039 (markdown) --- SC2039.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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`