delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/14/07:36:00

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 14 Oct 2008 13:35:07 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: recently introduced egrep problem
Message-ID: <20081014113507.GR9289@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <63fec1650810140416y3092fcccg54b274b6777b66aa AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <63fec1650810140416y3092fcccg54b274b6777b66aa@mail.gmail.com>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Oct 14 07:16, rick lavery wrote:
> Up until a recent release of grep I could execute this command in
> cygwin and it worked without any problems.
> 
> echo 20081013193545 | egrep -Eo '[0-9]{1,2}'
> 
> This same command still works on other distributions such as centos,
> rhel4, rhel5, fedora core 9, etc.
> 
> in cygwin:
> $ echo 20081013193545 | egrep -Eo '[0-9]{1,2}'
> egrep: unknown option -- E
> Usage: egrep [OPTION]... PATTERN [FILE]...
> Try `egrep --help' for more information.
> 
> in other distros:
> $ echo 20081013193545 | egrep -Eo '[0-9]{1,2}'
> 20
> 08
> 10
> 13
> 19
> 35
> 45

Disabling -E/-F/-G/-P in egrep/fgrep is an upstream decision.  Actually
egrep and fgrep are deprecated, see `egrep --help' Other distros are
using older grep versions, that's why it still works there.  And, btw,
egrep -E is a tautology anyway.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019