X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type; q=dns; s=default; b=h5n/8Y lhmeW7Tqv/mMw9F2OtJjjchUQgu5y+b90WLANJHSNolRF2nQKkeTFDR8nDO1J+HS mSmj74j35CK7Wj9LDbeZW4OcoNTi3dwke5aPuODaUsEWzBVrjtm3tAre2eE4EgnJ 7+78RmyEK0Xy5us4IFHuyyWJuesAUwi8doCCg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type; s=default; bh=Yt/2/b1wUO6Z xAV/TL0xYxC2ZtU=; b=s8QEP7ecL8BQdhme44TJsbyQBkBSleiqH4S+CK+lQA7D t/BZlfS4afkIFqpCKVyHxblsn6ccqOp8vag2JhWjJN0x3bH8fnWCfowXd/YxTv1f 3JRhzaXrkXOnS809Gl+1htMuYLOrtGQVt4xQMYgwqlr7h8L3A8gAFUENjfJ0IKQ= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Message-ID: <54354921.7060006@redhat.com> Date: Wed, 08 Oct 2014 08:24:33 -0600 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 AT cygwin DOT 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 --p9LwPccW9A1tFp87fxdHLsMcifepDFSgd Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" -----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--