X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <49AE88A8.4030305@lysator.liu.se> Date: Wed, 04 Mar 2009 14:56:56 +0100 From: Peter Rosin User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: grep -P regexp problem References: In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Den 2009-03-03 19:26 skrev Andriy Sen: > > Below is an example of the problem. > > G:\>grep -V > GNU grep 2.5.3 > > Copyright (C) 1988, 1992-2002, 2004, 2005 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > > G:\>cat test.s > a > 1 > > G:\>cat test.s | grep -P "[^0]1" > a > 1 > > G:\> FYI, appears to not be cygwin specific... $ uname -s -r Linux 2.6.23-gentoo-r8 $ grep -V grep (GNU grep) 2.5.1 Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ cat test.s a 1 $ cat test.s | grep -P "[^0]1" a 1 $ od -a test.s 0000000 a nl 1 nl 0000004 Cheers, Peter -- 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/