[SunHELP] Grep Help

Lund, Dennis sunhelp at sunhelp.org
Mon Sep 24 06:54:46 CDT 2001


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C144EF.B4F915E0
Content-Type: text/plain

Use "egrep".

egrep 'a|b|c|d' fileneme

Dennis L. Lund

-----Original Message-----
From: Shain Miley [mailto:smiley at tvdata.com]
Sent: Wednesday, September 19, 2001 2:57 PM
To: sunhelp at sunhelp.org
Subject: Re: [SunHELP] Grep Help


In this instance I do not need to go into subdirectories, there is only
one file that I will be looking at.  I am looking for a way to search
one file for many many things.  I thought that pattern list was what
I was looking for but now I am unsure.

Shain


"Fogg, James" wrote:

> I highly recommend rgrep (recursive grep), esp. since it can search
> subdirectories.
>
> > -----Original Message-----
> > From: Shain Miley [mailto:smiley at tvdata.com]
> > Sent: Tuesday, September 18, 2001 6:52 PM
> > To: sunhelp at sunhelp.org
> > Subject: [SunHELP] Grep Help
> >
> >
> > Hi,
> > I need to search for about 15 things (list of ip addresses
> > and hostnames) in a file useing grep.  Do I have to use grep
> > 15 different times or can I give
> > multiple search options to one grep command?  I tried 'grep
> > 'a b c d e' file' but I get an error:   grep: RE error 41: No
> > remembered search string.  Any
> > ideas?  i have tried using examples I found on the web but it
> > looks like that does an exact search or something other than
> > what I need.  Thanks.
> >
> > Shain
> >
> > _______________________________________________
> > SunHELP maillist  -  SunHELP at sunhelp.org
> > http://www.sunhelp.org/mailman/listinfo/sunhelp
> >
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp

_______________________________________________
SunHELP maillist  -  SunHELP at sunhelp.org
http://www.sunhelp.org/mailman/listinfo/sunhelp


<html>
<body>
<font size="3" face="Times New Roman"><span style="mso-fareast-font-family: Times New Roman; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">
- - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - -
<span style="font-size:10.0pt;font-family:Times New Roman;
mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US;mso-fareast-language:
EN-US;mso-bidi-language:AR-SA"></span><font face="Times New Roman" size="3"><span style="mso-fareast-font-family:Times New Roman; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.</span></font></p>
</body>
</html>

------_=_NextPart_001_01C144EF.B4F915E0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version 5.5.2654.45">
<TITLE>RE: [SunHELP] Grep Help</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Use "egrep".</FONT>
</P>

<P><FONT SIZE=3D2>egrep 'a|b|c|d' fileneme</FONT>
</P>

<P><FONT SIZE=3D2>Dennis L. Lund</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Shain Miley [<A HREF=3D"mailto:smiley at tvdata.com">=
mailto:smiley at tvdata.com</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, September 19, 2001 2:57 PM</FONT>
<BR><FONT SIZE=3D2>To: sunhelp at sunhelp.org</FONT>
<BR><FONT SIZE=3D2>Subject: Re: [SunHELP] Grep Help</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>In this instance I do not need to go into subdirectories,=
 there is only</FONT>
<BR><FONT SIZE=3D2>one file that I will be looking at.  I am looking f=
or a way to search</FONT>
<BR><FONT SIZE=3D2>one file for many many things.  I thought that patt=
ern list was what</FONT>
<BR><FONT SIZE=3D2>I was looking for but now I am unsure.</FONT>
</P>

<P><FONT SIZE=3D2>Shain</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>"Fogg, James" wrote:</FONT>
</P>

<P><FONT SIZE=3D2>> I highly recommend rgrep (recursive grep), esp. sinc=
e it can search</FONT>
<BR><FONT SIZE=3D2>> subdirectories.</FONT>
<BR><FONT SIZE=3D2>></FONT>
<BR><FONT SIZE=3D2>> > -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>> > From: Shain Miley [<A HREF=3D"mailto:smiley at tv=
data.com">mailto:smiley at tvdata.com</A>]</FONT>
<BR><FONT SIZE=3D2>> > Sent: Tuesday, September 18, 2001 6:52 PM</FON=
T>
<BR><FONT SIZE=3D2>> > To: sunhelp at sunhelp.org</FONT>
<BR><FONT SIZE=3D2>> > Subject: [SunHELP] Grep Help</FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > Hi,</FONT>
<BR><FONT SIZE=3D2>> > I need to search for about 15 things (list of =
ip addresses</FONT>
<BR><FONT SIZE=3D2>> > and hostnames) in a file useing grep.  Do=
 I have to use grep</FONT>
<BR><FONT SIZE=3D2>> > 15 different times or can I give</FONT>
<BR><FONT SIZE=3D2>> > multiple search options to one grep command?&n=
bsp; I tried 'grep</FONT>
<BR><FONT SIZE=3D2>> > 'a b c d e' file' but I get an error: &nb=
sp; grep: RE error 41: No</FONT>
<BR><FONT SIZE=3D2>> > remembered search string.  Any</FONT>
<BR><FONT SIZE=3D2>> > ideas?  i have tried using examples I fou=
nd on the web but it</FONT>
<BR><FONT SIZE=3D2>> > looks like that does an exact search or someth=
ing other than</FONT>
<BR><FONT SIZE=3D2>> > what I need.  Thanks.</FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > Shain</FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> > ______________________________________________=
_</FONT>
<BR><FONT SIZE=3D2>> > SunHELP maillist  -  SunHELP at sunhelp=
.org</FONT>
<BR><FONT SIZE=3D2>> > <A HREF=3D"http://www.sunhelp.org/mailman/list=
info/sunhelp" TARGET=3D"_blank">http://www.sunhelp.org/mailman/listinfo/sun=
help</A></FONT>
<BR><FONT SIZE=3D2>> ></FONT>
<BR><FONT SIZE=3D2>> _______________________________________________</FO=
NT>
<BR><FONT SIZE=3D2>> SunHELP maillist  -  SunHELP at sunhelp.org<=
/FONT>
<BR><FONT SIZE=3D2>> <A HREF=3D"http://www.sunhelp.org/mailman/listinfo/=
sunhelp" TARGET=3D"_blank">http://www.sunhelp.org/mailman/listinfo/sunhelp<=
/A></FONT>
</P>

<P><FONT SIZE=3D2>_______________________________________________</FONT>
<BR><FONT SIZE=3D2>SunHELP maillist  -  SunHELP at sunhelp.org</FONT>
<BR><FONT SIZE=3D2><A HREF=3D"http://www.sunhelp.org/mailman/listinfo/sunhe=
lp" TARGET=3D"_blank">http://www.sunhelp.org/mailman/listinfo/sunhelp</A></=
FONT>
</P>

<CODE><FONT SIZE=3D3><BR>
<BR>
<html><BR>
<body><BR>
<font size=3D"3" face=3D"Times New Roman"><span style=3D"mso-fareast-font-f=
amily: Times New Roman; mso-ansi-language: EN-US; mso-fareast-language: EN-=
US; mso-bidi-language: AR-SA"><BR>
- - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - -<BR>
<span style=3D"font-size:10.0pt;font-family:Times New Roman;<BR>
mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US=
;mso-fareast-language:<BR>
EN-US;mso-bidi-language:AR-SA"></span><font face=3D"Times New Roman" size=
=3D"3"><span style=3D"mso-fareast-font-family:Times New Roman; mso-ansi-lan=
guage: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">This e=
-mail and any attachments may contain information which is confidential, pr=
oprietary, privileged or otherwise protected by law. The information is sol=
ely intended for the named addressee (or a person responsible for deliverin=
g it to the addressee). If you are not the intended recipient of this messa=
ge, you are not authorized to read, print, retain, copy or disseminate this=
 message or any part of it. If you have received this e-mail in error, plea=
se notify the sender immediately by return e-mail and delete it from your c=
omputer.</span></font></p><BR>
</body><BR>
</html><BR>
</FONT></CODE></BODY>
</HTML>
------_=_NextPart_001_01C144EF.B4F915E0--



More information about the SunHELP mailing list