Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Accumulo >> mail # user >> egrep usage - 1.3.4


Copy link to this message
-
Re: egrep usage - 1.3.4
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 <[EMAIL PROTECTED]> wrote:

> I think you need to do egrep .*adsf.*    to match the substring
>
> On Fri, Jul 27, 2012 at 1:02 PM, Kristopher Kane <[EMAIL PROTECTED]>
> 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
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB