On 3/12/14 12:14 PM, Evan Gates wrote:
> setup:
> foo() { printf "%q\n" "$IFS" >&2; printf "%s\n" "$*" >&2; }
> IFS=: read <<< "$(foo bar baz qux)"
>
> bash 4.2 output:
> :
> bar:baz:qux
>
> bash 4.3 output:
> :
> bar baz qux
>
>
> IFS is still set within the function call, but isn't being used in the
> expansion of "$*"
This is a cosmetic issue; the value displayed for IFS is wrong. The
bash-4.3 behavior is correct. It was a bug in bash-4.2 that it allowed a
value for IFS supplied as a temporary variable to affect word expansion
and redirections; those assignments should be `saved' until after
expansions are performed.
The issue was first discussed in early 2013:
http://lists.gnu.org/archive/html/bug-bash/2013-01/msg00041.html
This and other threads pointing out inconsistencies in IFS and assignments
were reported by the always-observant Dan Douglas.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/