| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| From: | "Jeff Jensen" <jeffjensen AT nospam DOT visi DOT com> |
| To: | <cygwin AT sources DOT redhat DOT com> |
| Subject: | issue with grep [^] |
| Date: | Thu, 24 Aug 2000 23:22:57 -0500 |
| Message-ID: | <000b01c00e4c$27c502e0$1d0ea8c0@visi.com> |
| MIME-Version: | 1.0 |
| X-Priority: | 3 (Normal) |
| X-MSMail-Priority: | Normal |
| X-Mailer: | Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
| Importance: | Normal |
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 AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |