/
spirzen
/
it-code-examples
Обзор
Документация
Войти
/
spirzen
/
it-code-examples
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
examples/lua/lua-515-172-004/main.lua
21 строка
542 B
Spirzen
Code migration pack
09 июн 2026, 01:41
09 июн 2026, 01:41
cebc284
Код
Авторство
О чём код?
function process_large_file(input_file, output_file) local input = io.open(input_file, "r") local output = io.open(output_file, "w") if not input or not output then if input then input:close() end if output then output:close() end return false end for line in input:lines() do local processed = string.gsub(line, "%s+", " ") output:write(processed, "\n") end input:close() output:close() return true end process_large_file("input.log", "output.log")