| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT 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 AT sbcglobal DOT 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 AT cygwin DOT com |
| Subject: | Re: Cygwin 1.7 string pattern matching problem with case sensitivity |
| References: | <7C0A6E33C0E12C44999E9E392D91BD8E74DC04589D AT MBX04 DOT bell DOT corp DOT bce DOT ca> |
| In-Reply-To: | <7C0A6E33C0E12C44999E9E392D91BD8E74DC04589D@MBX04.bell.corp.bce.ca> |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 2011-03-17 12:44Z, jean-benoit DOT ouellet AT HIDDEN DOT 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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |