X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-0.9 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU
X-Spam-Check-By: sourceware.org
X-Yahoo-SMTP: mjD.OBqswBAPbVUxYJaYPvc61jLEnpq8VnBwJGdbEJOPA9xw
Message-ID: <4D820902.4080805@sbcglobal.net>
Date: Thu, 17 Mar 2011 13:13:38 +0000
From: Greg Chicares <gchicares@sbcglobal.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Cygwin 1.7 string pattern matching problem with case sensitivity
References: <7C0A6E33C0E12C44999E9E392D91BD8E74DC04589D@MBX04.bell.corp.bce.ca>
In-Reply-To: <7C0A6E33C0E12C44999E9E392D91BD8E74DC04589D@MBX04.bell.corp.bce.ca>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 2011-03-17 12:44Z, jean-benoit.ouellet@HIDDEN.ca wrote:
>
> I just upgraded Cygwin from 1.5.21-2 to 1.7.8-1 and I'm getting problems with case sensitivity.
> Let's assume that 'file.csv' contains these 2 lines:
> Hello, 123
> hello, 456 
>
> The following commands will output both lines instead of the desired first line only:
> awk -F, '$1 ~ /^[A-Z]/ {print $0}' file.csv
> grep "^[A-Z]/" file.csv

Either override the locale
  http://www.cygwin.com/cygwin-ug-net/setup-locale.html
or, preferably, use character classes, e.g.:

$grep '^[[:upper:]]' file.csv
Hello, 123

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

