On 09/06/2560 02:14, Greg Wooledge wrote:
> Well, it leaves IFS changed, because you didn't revert or unset it,
> or run the entire thing in a function with local IFS.  Also, I'd use
> "${MAPFILE[*]}" to reinforce that you are joining an array into a string,
> rather than expanding the array as a list.

Thanks for pointing all this out. I settled on:
mapfile <"$file"; IFS= foo=${MAPFILE[*]} true

Again, much faster than a subshell. Are there order guarantees in the
case of "a=x b=y command"??

Peter

Reply via email to