How do I remove all lines from a file up to a keyword?


To remove all lines up to and including a keyword from a file simply use sed as follows:

sed '1,/keyword/d' infile > outfile

(replacing keyword/infile/outfile with the relevant data)

Tags: edit, remove, sed
Last update:
2014-12-16 21:58
Author:
Chris Burton
Revision:
1.0
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.

Records in this category

Tags