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

grep out a double string 1

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
IL
HI,

How would I grep out (grep -v) lines where a certain string appears twice - line in the example below grep out all lines where the hostname (condor2) appears twice:

tcp 0 0 condor2.csil.cre.32988 condor2.csil.cre.graPH ESTABLISHED

"Long live king Moshiach !"
 
What about trying

grep -v "condor2.csil.cre.*condor2.csil.cre"

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top