bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9450: Bug report on 'dirname' : when jokers match several files


From: Eric Blake
Subject: bug#9450: Bug report on 'dirname' : when jokers match several files
Date: Tue, 06 Sep 2011 08:24:17 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110817 Fedora/3.1.12-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.12

9450 tag wishlist
thanks

On 09/06/2011 07:53 AM, Laurent TARRISSE wrote:
Hi

Here this a strange behaviour using 'dirname' with joker filename:

The term is 'wildcard', not 'joker'

dirname: too many arguments
Try `dirname --help' for more information.

Thanks for the report. To some degree, this is expected behavior: POSIX requires that portable shell scripts pass exactly one argument to dirname, so passing 0 or more than 1 arguments is necessarily in the realm of non-portable code, and we would rather error out if we don't have any better defined semantics for an extension.

Could 'dirname' process only its first parameter ?

No. But there _has_ been requests in the past to add an extension to GNU coreutils to match BSD dirname/basename semantics of optionally taking more than one parameter:

https://lists.gnu.org/archive/html/bug-coreutils/2010-05/msg00015.html

But so far, no one has submitted patches. Therefore, I'll keep this bug report open, but tag it as a wishlist.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org





reply via email to

[Prev in Thread] Current Thread [Next in Thread]