Delete lines containing a specific word

Grant Edwards grante at
Sun Jan 6 20:15:10 CET 2008

On 2008-01-06, Matt Nordhoff <mnordhoff at> wrote:

>> Please, how to adapt the following script (to delete blank lines) to delete
>> lines containing a specific word, or words?

> If you're on Linux, why not just use grep?
> $ grep -v theword output.pdb

And if you're on Windows, install Cygwin, and then use grep. Or
install any of about a half-dozen native Win23 implementations
of grep.

Grant Edwards                   grante             Yow! I'm having a BIG BANG
                                  at               THEORY!!

More information about the Python-list mailing list