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: | "Robert Praetorius" <RPraetorius AT AspenRes DOT Com> |
Organization: | Ministry of Hobo Regalia, Gauntlet Division |
To: | "Jeff Jensen" <jeffjensen AT visi DOT com> |
Date: | Fri, 25 Aug 2000 22:40:58 +1000 |
MIME-Version: | 1.0 |
Subject: | Re: issue with grep [^] |
Reply-to: | RPraetorius AT AspenRes DOT Com |
CC: | cygwin AT sources DOT redhat DOT com |
Message-ID: | <39A6F5FA.12572.5BD475E4@localhost> |
In-reply-to: | <000b01c00e4c$27c502e0$1d0ea8c0@visi.com> |
X-mailer: | Pegasus Mail for Win32 (v3.12c) |
> 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. ^ is the quoting character for NT's CMD.EXE (bash doesn't exhibit this problem). Also note that CMD.EXE requires | must be double quoted if you're passing it through a pipe (again bash doesn't need this): F:\temp>echo ^| | cat The syntax of the command is incorrect. F:\temp>echo ^^^| | cat | F:\temp>bash $ echo \| | cat | $ echo \\\| | cat \| Follow start menu => help => Windows NT commands => command symbols for docs on CMD.EXE's special characters. Or just spend you time in bash, which is friendlier and more featureful:-) -------d-o---y-o-u---s-e-e---G-o-d---i-n---c-o-n-v-e-c-t-i-o-n-?-------- "oncology recapitulates philately" --Mark Maxson Robert M. Praetorius "balance, not symmetry" --Mark Stanley home: rmp AT MA DOT UltraNet DOT Com (attribution by Stigler) work: RPraetorius AT AspenRes DOT Com -- 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 |