On 3/30/23 2:12 PM, Felipe Contreras wrote:
     IFS=,
     str='foo,bar,,roo,'
     printf '"%s"\n' $str
zsh is the only shell that generates an empty last field, no other shell exhibits this behavior.

Besides your link says:
>The shell shall treat each character of the IFS as a delimiter and use the delimiters as *field >terminators* to split the results of parameter expansion, command substitution, and arithmetic >expansion into fields.

So the delimiters terminate fields, not separate them.


Reply via email to