[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dirname/basename bug

From: jl malet
Subject: Re: dirname/basename bug
Date: Wed, 24 Jan 2007 22:18:01 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv: Gecko/20070108 SeaMonkey/1.0.7

thanks for the precision.... I did saw that part of posix specifying the -- behaviour (I thought it was an extension of certain gnu tools)
I keep that in mind
best regards

Eric Blake wrote:
Hash: SHA1

According to jl malet on 1/24/2007 3:28 AM:
thoses 2 utils have problem when files/path contain '-' character which
is interpreted as an option.....
this addition of the gnu tools isn't in posix or the open group
specification which have no option.... the best is to have no option
best regards

Thanks for the report.  However, this is not a bug, but a misunderstanding
on your part of what POSIX requires.

'dirname -- -file' is the correct way to invoke dirname on something
starting with -.  POSIX does not require the support of any options, but
it ALSO does not forbid any options as extensions.  POSIX is quite clear
that except for a few special cases (such as test and echo), users of
utilities specified by POSIX must properly separate filenames from options
using -- if the filename could be interpreted as an option, because
implementations are allowed to add options as extensions.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


reply via email to

[Prev in Thread] Current Thread [Next in Thread]