[lug] grep question
Chip Atkinson
chip at pupman.com
Tue Jun 12 07:45:16 MDT 2007
Ok, here's something to chew on:
chip at chip1:~> echo $LANG
en_US.UTF-8
chip at chip1:~> echo abc | grep A
chip at chip1:~> echo abc | grep a
abc
chip at chip1:~> echo abc | grep "[A-Z]"
abc
chip at chip1:~> export LANG=C
chip at chip1:~> echo abc | grep "[A-Z]"
chip at chip1:~>
The distribution is SuSE enterprise linux. It seems that the LANG stuff
only affects an expression in set of mini-experiments.
Another thing that is odd is that there are many programs in /usr/bin with
symlinks to their counterpart in /bin. However, /usr/bin isn't a symlink
to /bin. I guess SuSE is "non-standard", but I thought it was a Red Hat
derivative.
Chip
On Mon, 11 Jun 2007, Collins Richey wrote:
> On 6/10/07, Jeffrey Haemer <jeffrey.haemer at gmail.com> wrote:
> > export LANG=C
> >
> > will cure this problem.
> >
>
> OK, read your explanation (LANG=C), but I have LANG=en_US.UTF-8, and I
> don't have the problem. I find it hard to believe that any distro
> would have a LANG= setting that would include lower case characters in
> the range A-Z. Even in unadulterated EBCDIC, abcde, etc. would not be
> a subset of A-Z.
>
> OTOH, a distro with /usr/bin/grep is already quite non-standard.
>
> --
> Collins Richey
> If you fill your heart with regrets of yesterday and the worries
> of tomorrow, you have no today to be thankful for.
> _______________________________________________
> Web Page: http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
>
More information about the LUG
mailing list