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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GREP HELp

Status
Not open for further replies.

Jonathan777

Technical User
Aug 23, 2001
26
0
0
US
How do I grep two or more variables from a file.

Thanks.

Jon
 
You egrep finding multiple patters

e.g

# egrep " user1|user2" /etc/passwd

# egrep &quot;[Mm]other |[Bb]rother&quot; <filename>

The Pipe in this command is instructed to match lines containing either brother or mother, capitalized or not. .

Farah regal
good luck
&quot;think twice and hit enter once&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top