[Top][All Lists]

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

Re: [coreutils] basename/dirname can't handle stdin?

From: Eric Blake
Subject: Re: [coreutils] basename/dirname can't handle stdin?
Date: Thu, 13 Jan 2011 16:51:30 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 01/13/2011 04:35 PM, Jeff Blaine wrote:
> Eric wrote:
>> basename -a -s suffix str1 str2: same (-a is only required for exactly
>> two arguements, and is implied for 0 or for more than 2 args)
> basename -a -s .txt foo.txt bar.txt baz.txt
> So you're saying -a is redundant there?  Sorry, I'm not
> familiar with BSD's basename at all.  Just looking to
> implement what you want.

Yes, the -a is redundant the moment you have -s.  (It helps that I have
a login to a FreeBSD machine, and have been testing these cases as I
type these mails).  It is only required when you have exactly 2
arguments but don't want the second to be treated as a suffix.

Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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