This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
issue with grep [^]
- To: <cygwin at sources dot redhat dot com>
- Subject: issue with grep [^]
- From: "Jeff Jensen" <jeffjensen at nospam dot visi dot com>
- Date: Thu, 24 Aug 2000 23:22:57 -0500
Hi,
grep (GNU grep) 2.2
(Cygnus)
Here is the situation:
I have a file with many lines containing this "-4)". And the number will
range from 1 to 5.
If I type:
cat x.txt | grep \\-[0-9]\)
it works great - the lines containing it are correctly returned.
But typing:
cat x.txt | grep \\-[^0-9]\)
doesn't work - the same result occurs as the first case above, like the ^ is
ignored.
Same happens with other simple regexps like this one:
cat x.txt | grep 1
works, but
cat x.txt | grep [^1]
again doesn't work - also has the same results as without the ^.
Does anyone know anything about this? This seems too simple to be a bug - I
must be doing something wrong!!
I tried the same file and commands on Solaris, and had the expected/correct
results.
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com