[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] linecut addition
From: |
Steven Schubiger |
Subject: |
Re: [RFC] linecut addition |
Date: |
Tue, 9 Oct 2007 18:07:07 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Jim Meyering <address@hidden> wrote:
> That's a good start, but please elaborate on the following, too:
>
> What if ranges overlap?
> I.e., --range 1,5:4,8
$ seq 10 | linecut --range 1,5:4,8
1
2
3
4
5
4
5
6
7
8
> Bear in mind that with an EOF-relative endpoint,
> we can't even know whether two ranges overlap until
> after reading to end of file.
Yes, true.
> What if one range is contained within another?
Something like
$ seq 10 | linecut --range 1,5:2,4
1
2
3
4
5
2
3
4
?
> What if they are out of order, e.g. --range 4,7:1,3 ?
$ seq 10 | linecut --range 4,7:1,3
4
5
6
7
1
2
3
> You don't say whether line numbering restarts with multiple input files.
> I presume not, but the spec/manual should specify.
The line numbering is unique to each input file.
> A note about notation. I'm used to seeing ":" or "-" between
> the endpoints of a range, not ",". "," is more often the separator
> *between* ranges. Please consider using a more conventional notation.
Would `linecut --range 1:2,3:4,-100:-1` be considered sensible?
Concerning the example outputs above, I'm not saying that I'm confident
that they make sense at all. It's just how the current implementation is.
- Re: [RFC] linecut addition, Steven Schubiger, 2007/10/06
- Re: [RFC] linecut addition, Jim Meyering, 2007/10/08
- Re: [RFC] linecut addition,
Steven Schubiger <=
- Re: [RFC] linecut addition, Steven Schubiger, 2007/10/09
- Re: [RFC] linecut addition, Matthew Woehlke, 2007/10/09
- Re: [RFC] linecut addition, Steven Schubiger, 2007/10/09
- Re: [RFC] linecut addition, Matthew Woehlke, 2007/10/09
- Re: [RFC] linecut addition, Steven Schubiger, 2007/10/09
- Re: [RFC] linecut addition, Matthew Woehlke, 2007/10/09
- Re: [RFC] linecut addition, Steven Schubiger, 2007/10/10