Delete lines containing a specific word

bukzor workitharder at gmail.com
Sun Jan 6 18:42:51 EST 2008


On Jan 6, 3:33 pm, Bjoern Schliessmann <usenet-
mail-0306.20.chr0n... at spamgourmet.com> wrote:
> Steven D'Aprano wrote:
> > grep doesn't delete lines. grep matches lines. If you want to
> > delete them, you still have to do the rest of the job yourself.
>
> In which way does "grep -v mypattern myfile > myfile" not delete the
> lines matching mypattern?
>
> Regards,
>
> Björn
>
> --
> BOFH excuse #184:
>
> loop found in loop in redundant loopback

If you do that, you'll find an empty file at the end.



More information about the Python-list mailing list