Strip lines from files
chiendarret at yahoo.com
Mon Jan 7 16:45:39 CET 2008
I am posting again as previous identical message had alleged suspicious header.
I used successfully script
for line in f:
if "WAT" not in line:
to strip lines containing the word WAT from a very long file.
A variant need has now emerged, to perform the same task from a very long
series of shorter files trp.pdb.1, trp.pdb.2 ,..... Could you see how to adapt
the above script to the new need?
grep -v WAT trp.pdb.1
grep -v WAT trp.pdb.2
grep -v WAT trp.pdb.n
Unless you can think better to remove that pervasive molecule of water, to
avoid performing the calculation ex novo.
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
More information about the Python-list