nv-l
[Top] [All Lists]

Re: Grep

To: nv-l@lists.tivoli.com
Subject: Re: Grep
From: "Owens, Blaine C" <bowens@EASTMAN.COM>
Date: Mon, 11 Jan 1999 07:47:30 -0500
Reply-to: Discussion of IBM NetView and POLYCENTER Manager on NetView <NV-L@UCSBVM.UCSB.EDU>
Sender: Discussion of IBM NetView and POLYCENTER Manager on NetView <NV-L@UCSBVM.UCSB.EDU>
Lucy, use "grep -w" (word).

Blaine Owens
Eastman Chemical Company
Email - bowens@eastman.com
Phone - (423)229-3579
Fax     - (423)229-1188

> -----Original Message-----
> From: Lucy Premus [SMTP:lpremus@metlife.com]
> Sent: Friday, January 08, 1999 4:41 PM
> To:   NV-L@UCSBVM.ucsb.edu
> Subject:      Grep
>
> Theres probably a very simple answer to this question, but I cannot
> for the
> life of me figure it out.  How do you grep for an EXACT match of a
> string?
> I have a file that looks something like this:
>
> 10.1.     #Bridgewater
> 10.10.  #Scranton
> 10.12.  #White Plains
> 10.13.  #Warwick
> 10.14.  #Tampa
> 10.16.  #One Penn Plaza
> 10.17.  #Mt. Prospect
> 10.18.  #Denver
>
> I'm trying to grep for the exact match of 10.1. in a script.  That
> string
> will actually be in a variable defined previously in the script.
> When the grep runs, it not only outputs the line    10.1.
> #Bridgewater
> (which is what I want), but it gives me every other line
> containing 10.1?.  How do I prevent that from happening?  I've tried
> putting single quotes, double quotes, etc around the variable
> name, but have had no success.  Am I missing something simple
> here?...............Lucy

<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web