Subject: bug#8420: closed (Re: bug#8420: dirname)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 04 Apr 2011 16:03:02 +0000

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 [email-masked].

-- 
8420: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8420
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#8420: dirname
From: Eric Blake <[email-masked]>
To: Michele Marigliano <[email-masked]>
Cc: [email-masked]
Date: Mon, 04 Apr 2011 10:02:14 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

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   [email-masked]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Subject: dirname
From: "Michele Marigliano" <[email-masked]>
To: <[email-masked]>
Date: Mon, 4 Apr 2011 15:43:36 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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