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

I Need help deleting lines from file where column1=xxx

Status
Not open for further replies.

mjuell

Programmer
Jun 26, 2003
17
NO
I want do delete the lines from a file where column 1 matches an exact pattern.

( I want to delete the lines where column 1=123, not the lines where its 21234 )

Please Help!....

 
Try...

awk '$1 != "123"' file1 > file2
 
Try this:
Code:
grep -v '^123' input >output

Hope This Help
PH.
 
Thanx...

it worked with grep -v '^123+RS' input >output


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top