Subject: bug#8420: dirname

From: "Michele Marigliano" <[email-masked]>
Date: Mon, 4 Apr 2011 15:43:36 +0200

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