Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Reply-To: <Jan.Schormann@BrainLAB.com>
From: "Jan Schormann" <Jan.Schormann@BrainLAB.com>
To: <cygwin@cygwin.com>
Subject: RE: sed: altered results in bash and cmd
Date: Sat, 4 Dec 2004 15:04:52 +0100
Message-ID: <KCEOLMMHICICJKHPFOALAEKPCNAA.Jan.Schormann@BrainLAB.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
In-Reply-To: <41B19CA6.6090203@schoenhaber.de>
X-OriginalArrivalTime: 04 Dec 2004 14:04:52.0858 (UTC) FILETIME=[39DDC5A0:01C4DA0A]
X-Spam-Status: No, hits=-105.4 required=6.0 tests=AWL,BAYES_01,IN_REP_TO,MSGID_GOOD_EXCHANGE, QUOTED_EMAIL_TEXT,RCVD_IN_ORBS,USER_IN_WHITELIST version=2.55
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
X-IsSubscribed: yes

Hi,

> C:\>E:\cygwin\bin\echo.exe '/^ .*$/d'
> / .*$/d

> I'm not really sure but I think cmd doesn't treat single quotes as
> quoting characters - at least not in the way bash does.

That's true. In addition, the '^' in cmd is an escape character,
like the backslash in sh. Search for "string literals" in the
XP help and support center.

Also, why not

$ grep -v "^ " filename

(slightly faster ;-)

HTH,
	Jan.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

