bug-coreutils
[Top][All Lists]
Advanced

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

Re: dirname/basename bug


From: Eric Blake
Subject: Re: dirname/basename bug
Date: Wed, 24 Jan 2007 07:28:09 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666

-----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]