[wplug] shell trick?

Eric Cooper ecc at cmu.edu
Sun May 28 13:37:44 EDT 2006


On Sun, May 28, 2006 at 11:54:56AM -0400, Bill Moran wrote:
> Zach <netrek at gmail.com> wrote:
> 
> > i am trying to grep a very large file (50MB) for hostnames containing
> > ".at" (Austria),
> > i tried "grep ".at" *" and it is giving references for "at" but i
> > don't want the word at i just want ".at", anyone know a way to do
> > this?
> 
> The . is a metacharacter.  To get a literal ., you need to escape it:
> 
> grep '\.at' *

Or use fgrep, which treats all characters literally:
    fgrep .at *

-- 
Eric Cooper             e c c @ c m u . e d u


More information about the wplug mailing list