[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: patterns
From: |
Paul Jarc |
Subject: |
Re: patterns |
Date: |
Mon, 15 Jul 2002 16:09:57 -0400 |
User-agent: |
Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i686-pc-linux-gnu) |
Ken Senior <address@hidden> wrote:
> cat file.txt | awk '/^[a-z]/ {print $0}'
This is equivalent to, but more expensive than:
awk '/^[a-z]/ {print $0}' < file.txt
> incorrectly returns not only those entries beginning with a lower case
> letter, but also upper case ones as well.
You're probably using a locale where uppercase and lowercase letters
are ordered together, like AaBbCc...Zz, so the range a-z includes B-Z.
You can use the "C" locale to use ASCII order. Set LC_ALL=C or
LC_COLLATE=C in your environment.
paul
- patterns, Ken Senior, 2002/07/15
- Re: patterns,
Paul Jarc <=