On Fri, Jul 18, 2014 at 03:46:34PM +1000, Brett Pemberton wrote:
> The command in question wasn't confused at all. The user was.

yes. and that's exactly the problem with spaces in filenames - it's easy
to forget to properly quote or escape the filename, especially for novice
shell users.  things that tend to confuse users are worth avoiding.

and it's far too easy to use 'find ... | xargs' or similar and forget
to use -0 (or not have a -0 / --null-terminated option available).
novice users wouldn't even know that such options are available on some
programs, or what they're for and why you'd want to use them.



> Some people's reaction to this hypothetical problem is "Don't use
> spaces in filenames, then you won't accidentally remove the wrong
> files when you tell rm to rm the wrong files"
> My reaction is "Don't tell rm to remove the wrong files".

my reaction is: "why cause potential hassles for yourself and others?"

my second reaction is: "deal with spaces etc via proper quoting in
your scripts/one-liners but avoid creating filenames with them because
they're a PITFA".


> However treating this hypothetical by arbitrarily choosing a subset of
> POSIX-OK characters in filenames is a silly response, in my opinion.
> Yours may vary, and that's fine.

The fact that you can do something (like have spaces and other annoying
characters in filenames) doesn't mean that you should or that it's a
good idea.

craig

-- 
craig sanders <[email protected]>
_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main

Reply via email to