local line = 1
local output = {}
for s in io.lines('C:\\foo.txt') do
if line == 6 then
output[#output+1] = 'Changed'
else
output[#output+1] = s
end
line = line + 1
end
local f = assert(io.open('C:\\foo.txt','w'))
f:write(table.concat(output, '\n'))
f:close()
_________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum