On 28 Apr 2011, at 1:11 pm, Digby Tarvin wrote:

On Thu, Apr 28, 2011 at 11:58:01AM +0200, Peter A. Cejchan wrote:
spaces in filenames.. does not it break the rules?? Who actually needs
them??

Well, for one thing it's much more natural to type a space than a hyphen or an underscore. For another, I for one am not likely to go through my system renaming the kajillion files I have with spaces in their names, particularly because I'm not sure what would break if I did.


++pac

Mostly people who have grown up with graphical user interfaces and
have no appreciation of the command line parsing complexity it
adds I think. And of course others that have to interract with
such people, such as sharing filesystems with them.

I'm surprised nobody's noted that rc handles spaces in filenames with far less complexity than Bourne shell. Bourne shell makes things complex by getting all paranoid-obsessive over word-splitting: it must do it at every possible opportunity unless explicitly commanded otherwise using a quoting method which also has other effects.

rc is much more sensible, handling spaces transparently in my typical usage: I pick a unique bit out of the middle of the filename and surround that with asterisks. rc does not attempt to split the resultant word whatever you do with it. Perhaps the eval builtin will split it but not much else will.

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().

On a slightly related topics, one of my constant headaches lately
is the problem of deciding what filesystem to put on large capacity
removeable storage to give me maximum interoperability...

Please don't run one topic into another, and please don't use reply to start a new topic. Some of us rely on threaded view, and some mail readers organise threads by a hidden In-Reply-To header.

Reply via email to