in reply to How do I delete from a delimiter to the end of a file?
I actually like ikegami's solution better, but this is what I thought of first:
perl -pi -e 'BEGIN{$/="\cB"} s{-{6}\sYahoo.*\z}{$/}ms' list of files
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I delete from a delimiter to the end of a file? (slurp--)
by tye (Sage) on Aug 25, 2008 at 03:12 UTC |