Re: How to handle whitespace in filenames ???
* Craig Dickson (email@example.com) spake thusly:
> Dimitri Maziuk wrote:
> > Wrong. There's a reason why people with half a clue don't put
> > spaces in paths, and inadequacy of tools is not it. Unless your
> > computer can read minds, it has no way of telling when the
> > whitespace's supposed to be input separator, and when it's just
> > a part of filename.
> Oh, come on. Unix shells already have rules for that. You escape the
> space, or put the full name in quotes. The problem is that many Unix
> tools don't correctly handle filenames with spaces.
See, there's this little problem when the same token means
two different things: you have to have enough context to
deduce the meaning. Even human brain with its zillion
shmebiflops dedicated to language parsing gets it wrong
occasionally. A computer is guaranteed to get it wrong.
Quotes are an ugly hack that only makes things worse:
you're just introducing another set of separators that
a) are legal filename chracters, b) require opening and
closing separators (that cannot be nested), and c) mean
different things to different interpreters. Have a look
at m4 macros sometime and try to figure out why they
use those funny quotes, for example.