Skip to content
Vidar Holen edited this page Jan 21, 2015 · 5 revisions

Did you mean IFS=$'\t' ?

Problematic code:

IFS="\t"

Correct code:

IFS=$'\t'

Rationale:

IFS="\t" splits on backslash and the letter "t". IFS=$'\t' splits on tab.

Exceptions

It's extremely rare to want to split on the letter "n" or "t", rather than linefeed or tab.

ShellCheck

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature above to find a specific one, or see Checks.

Clone this wiki locally