[Tutor] manipulating a file

Alan Gauld alan.gauld at freenet.co.uk
Mon Feb 7 20:53:05 CET 2005


> About the efficiency, why do u need python at all...
> How abt a simple shell command....
>        cat httpd-access.log>>log.bak
> 

Because that would be a copy, well actually an append...

cp httpd-access.log log.bak

would be better!

But the OP wanted to strip out long lines in transit
not just copy...

Alan G.




More information about the Tutor mailing list