[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:1.9.2.13) 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 http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [coreutils] basename/dirname can't handle stdin?, (continued)
- Re: [coreutils] basename/dirname can't handle stdin?, Jeff Blaine, 2011/01/12
- Re: [coreutils] basename/dirname can't handle stdin?, Jim Meyering, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?, Jeff Blaine, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?, Philipp Thomas, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?, Jim Meyering, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?, Eric Blake, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?, Jim Meyering, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?, Eric Blake, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?, Jeff Blaine, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?, Jeff Blaine, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?,
Eric Blake <=
- [coreutils] Re: basename/dirname can't handle stdin?, Andreas Schwab, 2011/01/14
- Re: [coreutils] basename/dirname can't handle stdin?, Eric Blake, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?, Pádraig Brady, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?, Eric Blake, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?, Pádraig Brady, 2011/01/13
Re: [coreutils] basename/dirname can't handle stdin?, Bob Proulx, 2011/01/12