Skip to content

Files

Latest commit

 

History

History
27 lines (16 loc) · 450 Bytes

SC2141.md

File metadata and controls

27 lines (16 loc) · 450 Bytes

Pattern: Suspicious IFS assignment

Issue: -

Description

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

Example of incorrect code:

IFS="\t"

Example of correct code:

IFS=$'\t'

Exceptions

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

Further Reading