This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Question regarding grep 2,6,3 regular expression looking for lines without something in a part of a line
- From: "Larry W. Virden" <lvirden at gmail dot com>
- To: cygwin <cygwin at cygwin dot com>
- Date: Wed, 8 Oct 2014 10:00:11 -0400
- Subject: Question regarding grep 2,6,3 regular expression looking for lines without something in a part of a line
- Authentication-results: sourceware.org; auth=none
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 format.
For example, a couple of lines might be:
"Doe, John";"Student";"Senior"
"Admin";"Staff";
Now, I want to perform a grep that returns lines that do not have a
comma in the "first column" of data.
I tried the obvious
grep '^"[^,"]";' file.csv
but did not get the results desired. I got nothing returned - but I
know there are lines like the admin line in the data.
I know there are all sorts of extended regular expression atoms
available; is this a case where I need egrep and something unique to
express the requirements?
--
Larry W. Virden
http://www.facebook.com/lvirden/
Even if explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
--
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