On Mon, 07 Jan 2008 00:33:36 +0100, Bjoern Schliessmann 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?

Okay, that will delete the lines matching mypattern. Unfortunately it 
will also delete all the lines NOT matching mypattern as well. Try it for 
yourself -- just not on anything you care about.

This is what happens when abstractions leak. You *think* you're deleting 
lines, but you're not. That's just an abstraction, and when it leaks, you 
break things.



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to