Re: It's 3am and I have no caffeine
On Wed, Sep 26, 2007 at 03:46:28AM -0400, Chuck Payne wrote:
> Guys,
>
> I am sorry to ask such a newbie question, and my eyes are crossed, no
> caffeine, and I have try everything on the man pages and my serveral books
> and I am not getting the answer.
>
> Ok. Here are my two question, and two question they yet be.
>
> I need to know the flag for grep to get the exact phrase, for payne.
>
> when I do grep for payne...I like this...
>
> cpayne
> cepayne
> payne
> apayne
>
> I know it got to be simple.
>
> Also, why can I do this zgrep -c, how can I get a count with zgrep.
>
> Again sorry I know these are simple newbie questions, but it late and my
> brain is aching for CAFFEINE....
>
> Payne
Chuck, there are different options depending what you want.
If you want to grep:
A line that starts with 'payne', this will do it:
egrep "^payne" greptest
If you want to grep a line 'payne' this will do it:
egrep "^payne$"
if you want a sentence that contains the word 'payne' then you need
something different.
cheers,
Kev
--
| .''`. == Debian GNU/Linux == | my web site: |
| : :' : The Universal |mysite.verizon.net/kevin.mark/|
| `. `' Operating System | go to counter.li.org and |
| `- http://www.debian.org/ | be counted! #238656 |
| my keyserver: subkeys.pgp.net | my NPO: cfsg.org |
|join the new debian-community.org to help Debian! |
|_______ Unless I ask to be CCd, assume I am subscribed _______|
Reply to: