Delete lines containing a specific word

Grant Edwards grante at visi.com
Sun Jan 6 14:15:10 EST 2008


On 2008-01-06, Matt Nordhoff <mnordhoff at mattnordhoff.com> 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!!
                               visi.com            



More information about the Python-list mailing list