From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31540 invoked by alias); 8 Oct 2014 14:24:41 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 31527 invoked by uid 89); 8 Oct 2014 14:24:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.9 required=5.0 tests=AWL,BAYES_00,PDF_ATTACHED,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 08 Oct 2014 14:24:36 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s98EOYec001449 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 8 Oct 2014 10:24:35 -0400 Received: from [10.3.113.126] (ovpn-113-126.phx2.redhat.com [10.3.113.126]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s98EOY8v002946 for ; Wed, 8 Oct 2014 10:24:34 -0400 Message-ID: <54354921.7060006@redhat.com> Date: Wed, 08 Oct 2014 14:24:00 -0000 From: Eric Blake User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Question regarding grep 2,6,3 regular expression looking for lines without something in a part of a line References: In-Reply-To: OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="p9LwPccW9A1tFp87fxdHLsMcifepDFSgd" X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00083.txt.bz2 --p9LwPccW9A1tFp87fxdHLsMcifepDFSgd Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 780 On 10/08/2014 08:00 AM, Larry W. Virden wrote: > I am using an older version of cygwin on a Windows 7 PC. > I have a file of data that is formatted in character separated value form= at. > For example, a couple of lines might be: >=20 > "Doe, John";"Student";"Senior" > "Admin";"Staff"; >=20 > Now, I want to perform a grep that returns lines that do not have a > comma in the "first column" of data. >=20 > I tried the obvious > grep '^"[^,"]";' file.csv That looks for lines containing a literal quote, then exactly one quoted character that is neither comma nor quote, then another literal quote. You forgot the *: '^"[^,"]*";' Your question is not cygwin-specific. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --p9LwPccW9A1tFp87fxdHLsMcifepDFSgd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 539 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUNUkhAAoJEKeha0olJ0NqGNkH/2s9+oXzqztNEGp7H5RoQKxN UT0OZHTN3M7RgOlvPLF7VWTy5zHP/fR9HMhLaWMiMtVBSmIosgi0HHI5jpbmOeEO AIEOroChnhxIc0PGAMRZrqb2YJyIws3ilTLa5gOToWo2udXoQeHqybFvrNVup4P2 9MC/Spk9z3z1YxTaRJkMu/pcyiG+ThBaCdU4k9up6HDL+EvODhVD/R9sW8NgplRd G1KBpGXsoam+p8BNUaQ2J17Ntd4mM2mN6jCxzEULwSaMJ/qYLJvuMLT+VGCT9VuH 3K/PUV+Gb34ysQJeK+CWV9l57wvVPqlSxluTAKZu2E0heoTNYS071ST5GBnSMdQ= =Bv8/ -----END PGP SIGNATURE----- --p9LwPccW9A1tFp87fxdHLsMcifepDFSgd--