On Tuesday, February 19, 2019 7:18:57 PM CET Bruno Haible wrote:
> Hi Pavel,
> 
> > > makes the IFS handling a bit more robust.
> 
> What I meant is that
> 
>    save_IFS="$IFS"
>    for fpf_dir in $fpf_dirs
>    do
>      IFS="$save_IFS"
>      [Some more code]
>    done
>    IFS="$save_IFS"
> 
> is more robust than
> 
>    save_IFS="$IFS"
>    for fpf_dir in $fpf_dirs
>    do
>      [Some more code]
>    done
>    IFS="$save_IFS"
> 
> because the [Some more code] may invoke word splitting, and as a programmer
> I would expect this word splitting to be performed against the default IFS.

Makes sense, thanks.  I was only confused by the var="$quoted_var" style,
which I was before discouraged from.

Pavel




Reply via email to