Add POSIX solution

Pascal Morin
2020-07-31 14:14:07 +02:00
parent f43adc3480
commit 8cbf475546

@@ -11,6 +11,12 @@ IFS="\t"
```sh ```sh
IFS=$'\t' IFS=$'\t'
``` ```
or POSIX:
```sh
IFS="$(printf '\t')"
```
### Rationale: ### Rationale:
@@ -19,3 +25,8 @@ IFS=$'\t'
### Exceptions ### Exceptions
It's extremely rare to want to split on the letter "n" or "t", rather than linefeed or tab. It's extremely rare to want to split on the letter "n" or "t", rather than linefeed or tab.
### Related resources
See https://github.com/koalaman/shellcheck/wiki/SC1012