coreutils
[Top][All Lists]
Advanced

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

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


From: Andreas Schwab
Subject: [coreutils] Re: basename/dirname can't handle stdin?
Date: Fri, 14 Jan 2011 19:45:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.91 (gnu/linux)


Eric Blake <address@hidden> writes:

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

The manpages are online under <http://www.freebsd.org/cgi/man.cgi>.

Andreas.

-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

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