Cut a file based on a text marker
I have a text file that has the following layout:
text
text
..
CUT HERE
text
text
..
The literal CUT HERE
appears only once. What I want to do using shell scripting, is to produce another file containing all the text below CUT HERE
, i.e. ignore whatever above CUT HERE
.
Thanks.
sed '0,/CUT HERE/d' file > new_file
精彩评论