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

Deleting a line from a file

Status
Not open for further replies.

ojosVerdes

Technical User
Joined
Oct 10, 2002
Messages
50
Location
US
How do I delete a line from a file.
let say that I want to delete a line that starts with 'foreign'

how do I do that?

Thanks in advance.
 
sed -e '/^foreign/d' myFile vlad
+---------------------------+
|#include<disclaimer.h> |
+---------------------------+
 
grep -v ^foreign filename > output file
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top