Replace in large text file ?

Steve vvw25w at googlemail.com
Sat Jun 5 22:27:51 EDT 2010


On 5 June, 08:53, Steve <vvw... at googlemail.com> wrote:
> I am new to Python and am wanting  to replace characters in a very
> large text file.....6 GB
> In plain language what I wish to do is:
>
> Remove all comma's
> Replace all @ with comma's
> Save as a new file.
>
> Any of you clever people know the best way to do this......idiot guide
> please.
>
> Thanks
>
> Steve

Many thanks for your suggestions.

sed -i 's/Hello/hello/g' file

Run twice on the CL..with the hello's changed for my needs did it in a
few minutes ,

Again thanks

Steve



More information about the Python-list mailing list