I am having a problem reconciling all of the field expansions rules in linux/unix, so I've been experimenting.  Here is an example which based on my reading is not consistent with what I'd expect.~$ IFS=$', \t\n'~$ for i in 1 2 3; do echo num:$i; donenum:1num:2num:3~$ myvar=1,2,3~$ for i in $myvar; do echo num:$i; donenum:1num:2num:3~$ for i in 1,2,3; do echo num:$i; donenum:1,2,3The last output to me is completely unexpected.  Where might I find the rule where field expansion only happens in a bash for loop for variables?It seems to me that the bash for loop isn't honoring the IFS value that I setup at the beginning. Am I misunderstanding something?
Unexpected field expansion behavior by bash for loop
bash
Execute this command:LESS=+/'^ *IFS *The' man bashTo read ( emphasis mine ):IFS     The Internal Field Separator that is used for word splitting after expansion and to split lines into words with the read builtin command. The default value is `<space><tab><newline>'.That means that if expansion did not take place, IFS field splitting also does not take place.Well, actually, spliting does take place in the original line but with the fix set of metacharacters | & ; ( ) < > space tabThe comma , is not a metacharacter and is not used to split.The chapter seven of this book has more detail about command-line processing:Splits the command into tokens that are separated by the fixed set of metacharacters: SPACE, TAB, NEWLINE, ;, (, ), <, >, |, and &. Types of tokens  include words, keywords, I/O redirectors, and semicolons.Takes the parts of the line that resulted from  parameter, command, and arithmetic substitution  and splits them into words again. This time it  uses the characters in $IFS as delimiters instead  of the set of metacharacters in Step 1.