RE: question on grep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



James Olin Oden wrote:
> 
> On 10/10/07, Ross S. W. Walker <rwalker@xxxxxxxxxxxxx> wrote:
> > mups.cp wrote:
> > >
> > > A simple one
> > > # echo "jerry jerry" | tr " " "\n" | grep -c jerry
> > > 2
> > >
> > > The perl seems more general.
> >
> >
> > To add yet another variation:
> >
> > echo "jerry jerry" | awk 'BEGIN {RS=FS} {/jerry/ jerry++} 
> END {print jerry}'
> >
> Did you mean:
> 
>    echo "jerry jerry" | awk 'BEGIN {RS=FS} /jerry/ {jerry++} 
> END {print jerry}'
> 
> The one you gave does not handle "jerry blue jerry" for instance?

Yes, thanks, I realized that after hitting send...

-Ross

______________________________________________________________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux