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


Message #10 received at 8420-done <at> debbugs.gnu.org (full text, mbox):

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 1 (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.