Re: [RFC] linecut addition

2007-10-09 Thread Matthew Woehlke
Steven Schubiger wrote: Matthew Woehlke wrote: So I guess it's important to specify if '-1' means "the last line", or "the n'th-to-last last line (n==1 in this example)" (in which case '-0' means something). Similarly, if 'n,+k' means "k line(s), starting at n" or "line n plus k line(s)". I

Re: [RFC] linecut addition

2007-10-09 Thread Steven Schubiger
Matthew Woehlke <[EMAIL PROTECTED]> wrote: > Disallowing it is fine, but if you disallow it, it seems reasonable to > expect the program to say that it was disallowed :-). (I'm on the fence > if this counts as a specification or implementation detail.) The more specification details we can agre

new coreutils snapshots (both .gz and .lzma)

2007-10-09 Thread Jim Meyering
Take your pick: http://meyering.net/cu/coreutils-6.9-322-b6904.tar.gz 8.4M http://meyering.net/cu/coreutils-6.9-322-b6904.tar.lzma 3.5M http://meyering.net/cu/coreutils-6.9-322-b6904.tar.gz.sig http://meyering.net/cu/coreutils-6.9-322-b6904.tar.lzma.sig Here are the subjects fr

Re: Bugreport for ChMod

2007-10-09 Thread Brian Dessent
Michael Gorbovitski wrote: > Maybe we could add several examples, to either the help or the man page? > > And no, neither the man page nor the info page is much better. What are you talking about? The info page has an entire section on this: $ info coreutils "Symbolic modes" -o - --subnodes 2>

Re: Bugreport for ChMod

2007-10-09 Thread Michael Gorbovitski
Micah Cowan wrote: > Michael Gorbovitski wrote: >> chmod --help >> results in : >> help for chmod >> .. >> Each MODE is of the form `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'. > >> Report bugs to . > > >> The above regular expression is unparsable by most people requesting the >

Re: [RFC] linecut addition

2007-10-09 Thread Matthew Woehlke
Steven Schubiger wrote: Matthew Woehlke wrote: Well, yes, I would hope so. If you can't write 'a + b' in your program, something is wrong ;-). (Use case is of course e.g. scripts where the beginning line is not known in advance, but you know you want N lines total.) Am I right assuming you m

Re: [RFC] linecut addition

2007-10-09 Thread Steven Schubiger
Matthew Woehlke <[EMAIL PROTECTED]> wrote: > Well, yes, I would hope so. If you can't write 'a + b' in your program, > something is wrong ;-). (Use case is of course e.g. scripts where the > beginning line is not known in advance, but you know you want N lines > total.) Am I right assuming you

Re: [RFC] linecut addition

2007-10-09 Thread Matthew Woehlke
Steven Schubiger wrote: Matthew Woehlke wrote: Do you plan to have a means of specifying a number of lines? E.g.: $ seq 10 | linecut --range 5,+3 5 6 7 I like the idea. And it should be rather easy to calculate the ending line position. Well, yes, I would hope so. If you can't write 'a +

Re: Bugreport for ChMod

2007-10-09 Thread Micah Cowan
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Michael Gorbovitski wrote: > chmod --help > results in : > help for chmod > .. > Each MODE is of the form `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'. > > Report bugs to . > > > The above regular expression is unparsable by most

Re: [RFC] linecut addition

2007-10-09 Thread Matthew Woehlke
Jim Meyering wrote: Matthew Woehlke wrote: @Jim, 'addr1,addr2' syntax belongs to sed, so I would argue it isn't "new". It's also easier to type when specifying only one range :-). Sure, but sed doesn't have the notion of a *sequence* of ranges, so it doesn't have to worry about parsing more t

Re: [PATCH] Command line parsing of ls, tail and wc with genparse

2007-10-09 Thread Jim Meyering
Andreas Schwab <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] (Michael Geng) writes: > >> Is there a special reason why you use fprintf (... , stdout) and >> fputs (stdout, ...) instead of printf and puts? > > Note that fputs (stdout) and puts are not the same. Good point. I'll bet that was why I

Re: [PATCH] Command line parsing of ls, tail and wc with genparse

2007-10-09 Thread Andreas Schwab
[EMAIL PROTECTED] (Michael Geng) writes: > Is there a special reason why you use fprintf (... , stdout) and > fputs (stdout, ...) instead of printf and puts? Note that fputs (stdout) and puts are not the same. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH,

Re: [RFC] linecut addition

2007-10-09 Thread Steven Schubiger
Matthew Woehlke <[EMAIL PROTECTED]> wrote: > Do you plan to have a means of specifying a number of lines? E.g.: > > $ seq 10 | linecut --range 5,+3 > 5 > 6 > 7 I like the idea. And it should be rather easy to calculate the ending line position. I hope the distinction between the '-' & '+' "prefi

Re: [RFC] linecut addition

2007-10-09 Thread Jim Meyering
Matthew Woehlke <[EMAIL PROTECTED]> wrote: > Steven Schubiger wrote: >> Would `linecut --range 1:2,3:4,-100:-1` be considered sensible? > > Do you plan to have a means of specifying a number of lines? E.g.: > > $ seq 10 | linecut --range 5,+3 > 5 > 6 > 7 > $ > > @Jim, 'addr1,addr2' syntax belongs t

Re: [RFC] linecut addition

2007-10-09 Thread Matthew Woehlke
Steven Schubiger wrote: Would `linecut --range 1:2,3:4,-100:-1` be considered sensible? Do you plan to have a means of specifying a number of lines? E.g.: $ seq 10 | linecut --range 5,+3 5 6 7 $ @Jim, 'addr1,addr2' syntax belongs to sed, so I would argue it isn't "new". It's also easier to t

Re: [PATCH] Command line parsing of ls, tail and wc with genparse

2007-10-09 Thread Jim Meyering
[EMAIL PROTECTED] (Michael Geng) wrote: > On Sat, Oct 06, 2007 at 05:35:43PM +0200, Jim Meyering wrote: >> [EMAIL PROTECTED] (Michael Geng) wrote: >> ... >> > file you extracted above is from the wc command. You can watch the genparse >> > generated parser for it from >> > http://genparse.sourcefo

Re: [PATCH] Command line parsing of ls, tail and wc with genparse

2007-10-09 Thread Michael Geng
On Sat, Oct 06, 2007 at 05:35:43PM +0200, Jim Meyering wrote: > [EMAIL PROTECTED] (Michael Geng) wrote: > ... > > file you extracted above is from the wc command. You can watch the genparse > > generated parser for it from > > http://genparse.sourceforge.net/examples/wc_clp.c. > > It's nice to se

Bugreport for ChMod

2007-10-09 Thread Michael Gorbovitski
chmod --help results in : help for chmod .. Each MODE is of the form `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'. Report bugs to . The above regular expression is unparsable by most people requesting the help. Reasoning: chmod is a basic linux command. If the user is r

Re: new snapshot (rm fixes and new program: mktemp)

2007-10-09 Thread Lasse Collin
Jim Meyering wrote: > Bauke Jan Douma <[EMAIL PROTECTED]> wrote: > > Never heard of it! > > Is this it: http://tukaani.org/lzma/ ? > > Yes. > > > Is it considered mature/stable?? The compression code is stable (it's from stable LZMA SDK). "Beta" refers mostly to the command line tool. It never go

Re: [RFC] linecut addition

2007-10-09 Thread Steven Schubiger
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 t