Jump to content

Globally replace text in several files: Difference between revisions

m
1GB limit
m (1GB limit)
Line 857:
=={{header|Phix}}==
ctrace.out was just a file that happened to be handy, obviously you'd have to provide your own file list.<br>
as hinted, you could probably improve on the error handling.<br>
get_text is deliberately limited to 1GB, for larger files use a temporary file, a loop of gets/puts, and delete_file/rename_file at the end.
<lang Phix>procedure global_replace(string s, string r, sequence file_list)
for i=1 to length(file_list) do
7,805

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.