Despite IFS
(presumably) standing for "internal(?) field separator", it's actually used as a field terminator. From the man page,
Word Splitting
The shell scans the results of parameter expansion, command substitu-
tion, and arithmetic expansion that did not occur within double quotes
for word splitting.
The shell treats each character of IFS as a delimiter, and splits the
results of the other expansions into words using these characters as
field terminators. [...]
The number of words that read
splits the input into depends on how many variables it needs to populate. Further, if there are more possible fields than variables, trailing terminators are preserved.
Using 1,2,"one,two",
as the example, we get the following fields for n
variables:
1,2,"one,two",
. All terminators are preserved.
1
and 2,"one,two",
1
, 2
, "one,two",
1
, 2
, "one
, and two"
1
, 2
, "one
, two"
.
In the case of 1,2,"one,two",,
and 4 variables, there is an "empty" field between the two final commas. You need a fifth variable to consume that in order to discard the trailing comma.
Quotes are ignored; there is no way to "escape" a field terminator to allow it to be treated literally.