mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2039 (markdown)
@@ -106,7 +106,7 @@ printf '%s' "$g" | grep aaa # since we want to avoid `echo`
|
|||||||
|
|
||||||
### echo flags
|
### echo flags
|
||||||
|
|
||||||
See https://unix.stackexchange.com/tags/echo.
|
See https://unix.stackexchange.com/tags/echo/info.
|
||||||
|
|
||||||
### `${var/pat/replacement}`
|
### `${var/pat/replacement}`
|
||||||
|
|
||||||
@@ -120,6 +120,8 @@ POSIX:
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
echo "$TERM" | sed -e 's/-256.*$//g'
|
echo "$TERM" | sed -e 's/-256.*$//g'
|
||||||
|
# Special case for this since we are matching the end:
|
||||||
|
echo "${TERM%-256*}"
|
||||||
```
|
```
|
||||||
|
|
||||||
### `printf %q`
|
### `printf %q`
|
||||||
|
Reference in New Issue
Block a user