From 8cbf4755469aedcb00cf10420ceeed9bdad5f1ab Mon Sep 17 00:00:00 2001 From: Pascal Morin Date: Fri, 31 Jul 2020 14:14:07 +0200 Subject: [PATCH] Add POSIX solution --- SC2141.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SC2141.md b/SC2141.md index 4359097..2f6fe8d 100644 --- a/SC2141.md +++ b/SC2141.md @@ -11,6 +11,12 @@ IFS="\t" ```sh IFS=$'\t' ``` +or POSIX: + +```sh +IFS="$(printf '\t')" +``` + ### Rationale: @@ -19,3 +25,8 @@ IFS=$'\t' ### Exceptions 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 \ No newline at end of file