Add an additional and different example of correct syntax using ANSI-C quoting.

wileyhy
2024-10-06 00:21:27 -07:00
parent 016b214b23
commit a398b93a34

@@ -29,6 +29,14 @@ line="foo
bar"
```
or
```sh
# Linefeed using ANSI-C quoting
line=$'foo\nbar'
```
### Rationale:
ShellCheck has found a `\t`, `\n` or `\r` in a context where they just become regular letters `t`, `n` or `r`. Most likely, it was intended as a tab, linefeed or carriage return.