实际上500mb的文本并不大,只是记事本很烂。您可能没有sed,因为您在Windows上,但至少尝试使用python天真解决方案,我认为它可以正常工作:
import oswith open('infile.txt') as f_in, open('outfile.txt', 'w') as f_out: f_out.write(f_in.read().replace('ROW_DEL ', os.linesep))
实际上500mb的文本并不大,只是记事本很烂。您可能没有sed,因为您在Windows上,但至少尝试使用python天真解决方案,我认为它可以正常工作:
import oswith open('infile.txt') as f_in, open('outfile.txt', 'w') as f_out: f_out.write(f_in.read().replace('ROW_DEL ', os.linesep))