Jim Meyering <[EMAIL PROTECTED]> 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. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
