🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #4419

Re: grep-ing for "*" with SKsh

#4419
From: Steve Koren
Date: Wed, 18 Jul 1990 01:31
18 lines
1142 bytes
Earlier I wrote this:

> The problem with using "grep" to search for the '*' is that the '*'
> is a "special" regular expression character meaning "0 or more of the
> previous expression".  It is also a special character to the shell,
> used in pattern matching.  You must escape both of these to use the
> '*' with grep.  Fgrep is easier.  If you normally find yourself
> using fgrep instead of grep, you can alias one to the other.

I forgot to include the exact command line to grep:

  grep '\\*' myfile

The first backslash escapes the second in SKsh.  Then, a single
backslash gets passed to grep which grep uses to escape the
'*' which is a special character.

   - steve
Technical Details
Message-ID: <13920075@hpfelg.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpfcso!hpfelg!koren
References: <alfredo.7294@ajahnv.lonestar.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpfcso!hpfelg!koren
From: koren@hpfelg.HP.COM (Steve Koren)
Newsgroups: comp.sys.amiga.tech
Subject: Re: grep-ing for "*" with SKsh
Message-ID: <13920075@hpfelg.HP.COM>
Date: 18 Jul 90 01:31:16 GMT
References: <alfredo.7294@ajahnv.lonestar.org>
Organization: HP Elec. Design Div. -FtCollins
Lines: 18