[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coreutils] basename/dirname can't handle stdin?
From: |
Jim Meyering |
Subject: |
Re: [coreutils] basename/dirname can't handle stdin? |
Date: |
Thu, 13 Jan 2011 16:14:25 +0100 |
Eric Blake wrote:
> 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.
I missed the addition of -a to the scope, but agree that it is worth adding.
The patch to add that new option belongs in a separate change-set, of course.
> 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.
Sure.
- [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, 2011/01/13
- Re: [coreutils] basename/dirname can't handle stdin?,
Jim Meyering <=
- 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
Re: [coreutils] basename/dirname can't handle stdin?, Bob Proulx, 2011/01/12