On Wed, Jan 20, 2010, Paolo Bonzini wrote: > On 01/20/2010 12:37 PM, Loïc Minier wrote: > >+ # not found > >+ IFS="$local_ifs" > If you do this, you should set IFS to space-tab-lf at the beginning of > the script, like this: > > IFS=" "" "" > "
Are you saying that I can't backup/restore IFS without setting it first? That would be odd; it works with bash, dash, and zsh here. Pointers to affected shell would help me avoid other issues with them. Alternatively, I could set IFS in a subshell. I checked the autoconf Portable Shell Programming section, but didn't find a similar recommendation: http://www.gnu.org/software/autoconf/manual/autoconf.html#index-IFS-1639 > or this (better because it does not rely on embedding whitespace > characters within the line): > IFS=`printf ' \t'`" > " If we go that route, perhaps IFS="`printf ' \t\n'`" would be more readable? I'm not sure how common printf is though. -- Loïc Minier