# IFS="\n"
# FOO="alpha\nbravo\ncharlie"
# for i in $FOO; do echo "%${i}%"; done
%alpha%
%%
%bravo%
%%
%charlie%When ash or bash does the word splitting, a empty field is expanded. This behavior seems to happen only with the newline character.
# IFS="\n"
# FOO="alpha\n\n\nbravo\n\ncharlie"
# for i in $FOO; do echo "%${i}%"; done
%alpha%
%%
%%
%%
%%
%%
%bravo%
%%
%%
%%
%charlie%In this case, the newline characters are not folded together like whitespace. Generally, there are '2n-1' null expansions for each 'n' instances of the newline character in the input word.
TIA.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

