Re: egrep oddity

2012-02-14 Thread Bob Proulx
Vincent Lefevre wrote: > So, where is the range specified? Somewhere in the depts of libc. Bob signature.asc Description: Digital signature

Re: egrep oddity

2012-02-07 Thread Vincent Lefevre
On 2012-02-06 11:50:16 -0700, Bob Proulx wrote: > Vincent Lefevre wrote: > > But the grep man page still says: > > > > Within a bracket expression, a range expression consists of two > > characters separated by a hyphen. It matches any single character that > > sorts between the

Re: egrep oddity

2012-02-06 Thread Bob Proulx
Vincent Lefevre wrote: > Bob Proulx wrote: > > The collation sequence of [a-z] in dictionary ordering is really > > "aAbBcC...xXyYzZ" and not "abc...z". So when you say "[a-z]" you are > > getting "aAbBcC...xXyYz" without 'Z' and when you say "[A-Z]" you are > > really getting "AbBcC...xXyYzZ" wit

Re: egrep oddity

2012-02-06 Thread Camaleón
On Mon, 06 Feb 2012 00:15:14 +0100, Tomas Volka wrote: > On Ne 05-02-12 | 23:04, Sven Joachim wrote: (...) >> > The "^[A-Z]" range will never match line beginning with a, since the >> > range matches only uppercase characters. >> >> Not quite true, this very much depends on the locale. >> >> S

Re: egrep oddity

2012-02-06 Thread Vincent Lefevre
On 2012-02-05 17:55:48 -0700, Bob Proulx wrote: > The collation sequence of [a-z] in dictionary ordering is really > "aAbBcC...xXyYzZ" and not "abc...z". So when you say "[a-z]" you are > getting "aAbBcC...xXyYz" without 'Z' and when you say "[A-Z]" you are > really getting "AbBcC...xXyYzZ" with '

Re: egrep oddity

2012-02-05 Thread Neal Murphy
On Sunday 05 February 2012 19:55:48 Bob Proulx wrote: > Neal Murphy wrote: > > For quite some time now, I've been getting peeved with egrep not > > doing what it should. > > You don't like it and I don't like it but the powers that be have > decided that within a locale, within libc, character col

Re: egrep oddity

2012-02-05 Thread Joel Roth
Thanks for this illuminating response to what I thought might have been mere user naivete. On Sun, Feb 05, 2012 at 05:55:48PM -0700, Bob Proulx wrote: > Neal Murphy wrote: > > For quite some time now, I've been getting peeved with egrep not > > doing what it should. > > You don't like it and I d

Re: egrep oddity

2012-02-05 Thread Bob Proulx
Neal Murphy wrote: > For quite some time now, I've been getting peeved with egrep not > doing what it should. You don't like it and I don't like it but the powers that be have decided that within a locale, within libc, character collation sequences will be dictionary ordering where case is folded

Re: egrep oddity

2012-02-05 Thread Tomas Volka
On Ne 05-02-12 | 23:04, Sven Joachim wrote: > On 2012-02-05 22:31 +0100, Tomas Volka wrote: > > > On Ne 05-02-12 | 16:03, Neal Murphy wrote: > >> For quite some time now, I've been getting peeved with egrep not doing > >> what it > >> should. > >> > >> I have Squeese installed and up-to-date. I

Re: egrep oddity

2012-02-05 Thread Jeff Goodman
On Sun, 5 Feb 2012 16:03:45 -0500 Neal Murphy wrote: > For quite some time now, I've been getting peeved with egrep not > doing what it should. > > I have Squeese installed and up-to-date. In an xterm running bash or > on a console running bash or dash, this command: > ls -C1 | egrep "^[A-Z]"

Re: egrep oddity

2012-02-05 Thread Sven Joachim
On 2012-02-05 22:31 +0100, Tomas Volka wrote: > On Ne 05-02-12 | 16:03, Neal Murphy wrote: >> For quite some time now, I've been getting peeved with egrep not doing what >> it >> should. >> >> I have Squeese installed and up-to-date. In an xterm running bash or on a >> console running bash or

Re: egrep oddity

2012-02-05 Thread Tomas Volka
On Ne 05-02-12 | 16:03, Neal Murphy wrote: > For quite some time now, I've been getting peeved with egrep not doing what > it > should. > > I have Squeese installed and up-to-date. In an xterm running bash or on a > console running bash or dash, this command: > ls -C1 | egrep "^[A-Z]" > retur

Re: egrep oddity

2012-02-05 Thread Joel Roth
On Sun, Feb 05, 2012 at 04:03:45PM -0500, Neal Murphy wrote: > For quite some time now, I've been getting peeved with egrep not doing what > it > should. > > I have Squeese installed and up-to-date. In an xterm running bash or on a > console running bash or dash, this command: > ls -C1 | egre

egrep oddity

2012-02-05 Thread Neal Murphy
For quite some time now, I've been getting peeved with egrep not doing what it should. I have Squeese installed and up-to-date. In an xterm running bash or on a console running bash or dash, this command: ls -C1 | egrep "^[A-Z]" returns all lines except those beginning with 'a'. Even the follo