If the files aren't huge, or the word appears fairly early (a few hundred MB) in the file, then you can do this with a "one-liner" (wrapped for viewing; adjust quoting to your OS needs):
perl -e"BEGIN{$/=qq[the word or phrase]}" -ne"$n=tell ARGV; close ARGV; truncate $ARGV, $n" path\to\the\file
In reply to Re: grep and delete
by BrowserUk
in thread grep and delete
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |