Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

-- to use grep to find a pattern --

Status
Not open for further replies.

r9ronaldo

Programmer
Jun 19, 2003
28
US
Hi,
I have a situation where I have to grep for the Pattern, and notjust one keyword or one line.

Anyway I can do that,

Your help is appreciated,

Thanks
 
I don't really understand your question.
May I suggest
Code:
 man egrep
and (if available on your *nix flavor)
Code:
 man regexp

Hope This Help
PH.
 
PHV,

Just an FYI, at least on HPUX, egrep is obsolete and has been replaced by grep -E and regexp has been replaced by regcomp.
 
r9ronaldo, if I understand your question correctly, you can use this:

grep -i "The pattern you are searching for" filename.txt

The -i tells grep not to worry about case.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top