[wplug] shell trick?
Moshe Katz-Hyman
mokatz at gmail.com
Tue May 30 08:44:59 EDT 2006
Or escape it as one should for a literal . in a regular expression:
grep [.]at *
Moshe
On 5/28/06, Eric Cooper <ecc at cmu.edu> wrote:
> 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
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
More information about the wplug
mailing list