removing a file with hyphens
abuse at cabal.org.uk
Thu Jun 7 12:46:04 BST 2007
On Thu, Jun 07, 2007 at 12:16:17PM +0100, Jonathan Stowe wrote:
> er 'rm', 'mv' et al are *not* "basic bash commands" - they are separate
> programs. IIRC the use of '--' to indicate the end of the options predates
> GNU (and hence bash) by some years.
That behaviour comes from getopt(3) which dates from 4.3BSD, according to
the man page, except on Linux where NIH applies and the man page only
discusses the GNU clone without acknowledging to BSD. I imagine that
commands predating 4.3BSD rolled their own argument passing and getopt(3)
just copied existing practice.
4.3BSD was released in June 1986, GNU's date is a bit harder to pin down but
RMS claims it was "conceived" in 1983.
I could look deeper, but it's not really worth the effort and it would
require resurrecting some of my seriously old and crappy hardware and
sticking an OS on it to check.
More information about the london.pm