> And someone made the same mistake of suggesting single quotes in both
> threads, when it wouldn't have helped either.
This ties in closely to why the world contains history lists like:
rm -f
rm \-f
rm '-f'
rm '\-f'
rm "\-f"
rm \\-f
Developing a good mental model of quoting is very useful, as is developing
a good mental model of which processing is done where.
-s
p.s.: In case anyone doesn't know, the problem in that example is that
the hyphens used to introduce command line options are not special characters
to the shell, so no amount of quoting fixes them, and there's not really
any convention for quoting them as such. The answer is either "rm -- -f"
or "rm ./-f".
p.p.s.: I once spent an hour trying to track down a problem which
turned out to be that 'httpd --version' not only doesn't give version
info; it spawns a dozen or so Apache processes which sit around answering
requests without being affected by the system's usual service start/stop
mechanism.
--
Copyright 2011, all wrongs reversed. Peter Seebach /
usenet...@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.