GNU bug report logs - #8420
dirname

Previous Next

Package: coreutils;

Reported by: "Michele Marigliano" <m.marigliano <at> almavivaitalia.it>

Date: Mon, 4 Apr 2011 15:29:01 UTC

Severity: normal

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "Michele Marigliano" <m.marigliano <at> almavivaitalia.it>
Subject: bug#8420: closed (Re: bug#8420: dirname)
Date: Mon, 04 Apr 2011 16:03:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#8420: dirname 

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 8420 <at> debbugs.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)]
From: Eric Blake <eblake <at> redhat.com>
To: Michele Marigliano <m.marigliano <at> almavivaitalia.it>
Cc: 8420-done <at> debbugs.gnu.org
Subject: Re: bug#8420: dirname
Date: Mon, 04 Apr 2011 10:02:14 -0600
[Message part 3 (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)]
[Message part 5 (message/rfc822, inline)]
From: "Michele Marigliano" <m.marigliano <at> almavivaitalia.it>
To: <bug-coreutils <at> gnu.org>
Subject: dirname 
Date: Mon, 4 Apr 2011 15:43:36 +0200
[Message part 6 (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 7 (text/html, inline)]

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.