O exemplo não define IFS dentro do script, porque o bash não permite importar IFS do ambiente, de acordo com um comentário em variables.c :
/* Don't allow IFS to be imported from the environment. */
temp_var = bind_variable ("IFS", " \t\n", 0);
setifs (temp_var);
Comandos incorporados e não script usam a atribuição para IFS , é claro, mas lembre-se de que IFS só se aplica a word-splitting :
The shell treats each character of
$IFSas a delimiter, and splits the results of the other expansions into words using these characters as field terminators. IfIFSis unset, or its value is exactly<space><tab><newline>, the default, then sequences of<space>,<tab>, and<newline>at the beginning and end of the results of the previous expansions are ignored, and any sequence ofIFScharacters not at the beginning or end serves to delimit words. IfIFShas a value other than the default, then sequences of the whitespace characters space and tab are ignored at the beginning and end of the word, as long as the whitespace character is in the value ofIFS(anIFSwhitespace character). Any character inIFSthat is not IFS whitespace, along with any adjacentIFSwhitespace characters, delimits a field. A sequence ofIFSwhitespace characters is also treated as a delimiter. If the value ofIFSis null, no word splitting occurs.