On 29 Apr 2011, at 3:00 pm, erik quanstrom wrote:

Parsing the output of programs which return filenames is the only
common case where I see any complexity from spaces, and then the
complexity only consists of setting and reverting $ifs. Granted that
could be smoother still, especially where you want a big file list in
for().

be careful.  setting ifs is global, and changes ifs for the whole
command, and doesn't change the behavior of external programs.
so it is both less and more than you want.

I always change it back immediately; a nuisance in for() as it has to be set before and re-set inside. I'm considering whether a new shell builtin would be desirable, similar to ` but always splitting on newlines and only newlines, regardless of $ifs.

Reply via email to