From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v753.1) In-Reply-To: References: <20110427131041.GA21774@skaro.cthulhu.dircon.co.uk> <0bc37e9990e3c3ebde8276275a170a88@quintile.net> <20110428121127.GD1020@skaro.cthulhu.dircon.co.uk> <3B3CAD91-6623-4E25-AB8A-FE1613ACFD83@fastmail.fm> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <2345D520-5F13-4A07-A96B-48B0A725A4C9@fastmail.fm> Content-Transfer-Encoding: 7bit From: Ethan Grammatikidis Date: Fri, 29 Apr 2011 16:06:24 +0100 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] spaces in filenames (and filesystems...) Topicbox-Message-UUID: d8fea666-ead6-11e9-9d60-3106f5b1d025 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.