[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 08:10:34 -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 08:03 AM, Jim Meyering wrote:
> Philipp Thomas wrote:
>
>> * Jim Meyering (address@hidden) [20110113 08:53]:
>>
>>>> * Add --suffix [suffix] to enable suffix killing (using
>>>> SUFFIX as the 2nd arg will no longer work going forward)
>>
>> Using SUFFIX as the second argument IMO has to keep working as otherwise
>> you'll break tons of scripts!
>
> What I think he meant is that we'll need a --suffix=SUFF
> option to specify a suffix, since when in --filter mode,
> each input will be treated as a file/dir name.
>
> Whereas, on the command line, we'll still accept only 1 or 2 args.
BSD basename accepts more than 2 args.
basename arg1 arg2 arg3 - no suffix, and print out three lines
That is, the suffix is available if either:
you pass exactly two args, and -a is not used
you pass the -s/--suffix option
(well, the long option spelling of --suffix would be new to GNU, but
makes sense).
Likewise, BSD basename accepts -a (how about --all as the long option
spelling) to override 2-argument becoming a suffix situation.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [coreutils] basename/dirname can't handle stdin?, Jeff Blaine, 2011/01/12
- Re: [coreutils] basename/dirname can't handle stdin?, Eric Blake, 2011/01/12
- Re: [coreutils] basename/dirname can't handle stdin?, Jeff Blaine, 2011/01/12
- 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 <=
- 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, 2011/01/13
- [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