Return-Path: X-Original-To: apmail-accumulo-user-archive@www.apache.org Delivered-To: apmail-accumulo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E7C349589 for ; Sat, 28 Jul 2012 23:57:57 +0000 (UTC) Received: (qmail 72818 invoked by uid 500); 28 Jul 2012 23:57:57 -0000 Delivered-To: apmail-accumulo-user-archive@accumulo.apache.org Received: (qmail 72684 invoked by uid 500); 28 Jul 2012 23:57:57 -0000 Mailing-List: contact user-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@accumulo.apache.org Delivered-To: mailing list user@accumulo.apache.org Received: (qmail 72672 invoked by uid 99); 28 Jul 2012 23:57:57 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jul 2012 23:57:57 +0000 Received: from localhost (HELO mail-vc0-f169.google.com) (127.0.0.1) (smtp-auth username vines, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jul 2012 23:57:57 +0000 Received: by vcbfl10 with SMTP id fl10so4234191vcb.0 for ; Sat, 28 Jul 2012 16:57:56 -0700 (PDT) Received: by 10.52.23.162 with SMTP id n2mr5908270vdf.59.1343519876078; Sat, 28 Jul 2012 16:57:56 -0700 (PDT) MIME-Version: 1.0 Reply-To: vines@apache.org Received: by 10.220.200.76 with HTTP; Sat, 28 Jul 2012 16:57:35 -0700 (PDT) In-Reply-To: <751586763.199531.1343413258369.JavaMail.root@linzimmb04o.imo.intelink.gov> References: <751586763.199531.1343413258369.JavaMail.root@linzimmb04o.imo.intelink.gov> From: John Vines Date: Sat, 28 Jul 2012 19:57:35 -0400 Message-ID: Subject: Re: egrep usage - 1.3.4 To: user@accumulo.apache.org Content-Type: multipart/alternative; boundary=20cf307ca41ef65c1104c5ec98d2 --20cf307ca41ef65c1104c5ec98d2 Content-Type: text/plain; charset=ISO-8859-1 What Keith said. Grep is implemented as a simple string.contains whereas an egrep will take the argument and compile it with Pattern.compile(arg). And when dealing with java, it does full matches, so adding the .* to start and end is necessary. John On Fri, Jul 27, 2012 at 2:20 PM, Keith Turner wrote: > I think you need to do egrep .*adsf.* to match the substring > > On Fri, Jul 27, 2012 at 1:02 PM, Kristopher Kane > wrote: > > All, > > > > Trying to use egrep in the shell on v1.3.4 - help says it is a java > format > > regex but what does that mean from the shell? egrep "asdf" -c ... > doesn't > > match anything whilst grep "asdf" -c ... does. What's required for the > > regex argument? > > > > Thanks, > > > > -Kris > --20cf307ca41ef65c1104c5ec98d2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable What Keith said. Grep is implemented as a simple string.contains whereas an= egrep will take the argument and compile it with Pattern.compile(arg). And= when dealing with java, it does full matches, so adding the .* to start an= d end is necessary.

John

On Fri, Jul 27, 2012 at 2:20 PM,= Keith Turner <keith@deenlo.com> wrote:
I think you need to do egrep .*adsf.* =A0 =A0to match the substring

On Fri, Jul 27, 2012 at 1:02 PM, Kristopher Kane <kkane.list@gmail.com> wrote:
> All,
>
> Trying to use egrep in the shell on v1.3.4 - help says it is a java fo= rmat
> regex but what does that mean from the shell? =A0egrep "asdf"= ; -c ... doesn't
> match anything whilst grep "asdf" -c ... does. =A0What's= required for the
> regex argument?
>
> Thanks,
>
> -Kris

--20cf307ca41ef65c1104c5ec98d2--