GNU bug report logs -
#8420
dirname
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Mon, 04 Apr 2011 10:02:14 -0600
with message-id <4D99EB86.1080901 <at> redhat.com>
and subject line Re: bug#8420: dirname
has caused the GNU bug report #8420,
regarding dirname
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
8420: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8420
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hi,
I execute the following bash command on RH 5.3
CURRENT_DIR=`/usr/bin/dirname $0`
/usr/bin/dirname: invalid option -- b
Try `/usr/bin/dirname --help' for more information.
[oracle <at> mpawls ~]$ /usr/bin/dirname --version
dirname (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie and Jim Meyering.
$ echo $0
-bash
$ dirname
dirname: missing operand
Try `dirname --help' for more information.
$ dirname -b
dirname: invalid option -- b
Try `dirname --help' for more information.
I tried it also on Centos 5.5 with same result.
Instead on RH 4.x------------------------------------------
$ CURRENT_DIR=`/usr/bin/dirname $0`
$ /usr/bin/dirname --version
dirname (GNU coreutils) 5.2.1
Written by David MacKenzie and Jim Meyering.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$
$ echo $0
-bash
$ dirname
dirname: too few arguments
Try `dirname --help' for more information.
$ dirname -b
.
$
Best wish
Michael
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
[Message part 6 (text/plain, inline)]
tag 8420 + invalid
thanks
On 04/04/2011 07:43 AM, Michele Marigliano wrote:
> Hi,
>
>
>
> I execute the following bash command on RH 5.3
>
> CURRENT_DIR=`/usr/bin/dirname $0`
>
> /usr/bin/dirname: invalid option -- b
Thanks for the report. However, this is not a bug in dirname, but in
your usage pattern. You are invoking "dirname -bash", which dirname
(rightly) interprets as the attempt to be the -b option, but dirname
does not have a -b option. You need to use -- to mark the end of
options and the start of arguments:
dirname -- "$0"
> dirname (GNU coreutils) 5.97
Wow, that's old. The latest stable version is 8.10.
> $ /usr/bin/dirname --version
>
> dirname (GNU coreutils) 5.2.1
Wow, that's even older, but same story.
--
Eric Blake eblake <at> redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 14 years and 52 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.