bug-coreutils
[Top][All Lists]
Advanced

[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:1.8.0.9) 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
JLM

Eric Blake wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to jl malet on 1/24/2007 3:28 AM:
hello
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
-----BEGIN PGP SIGNATURE-----
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

iD8DBQFFt2z584KuGfSFAYARAoUFAJ0by8wHpPnRKbjhYNv6BnDuErSLPwCeJQNX
x9LOHY/LM4y5Bt967GrLIAU=
=+gX2
-----END PGP SIGNATURE-----





reply via email to

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