local f= io.open"file.txt" repeat local l= f:read("l") if l then print(l) end until not l f:close()