lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I'm in the unfamiliar position of having to be worried about
whether my Lua program will run properly not only on a Linux
system but on someone else's Windows or Macintosh.

The program is a text filter: it reads a text file line by line,
does something to the lines and writes it out.  I do the
reading in using file:lines() which strips off end-of-line
and the writing out by

 io.write(table.concat(lines,'\n'))

I suppose that "\n" should be system EOL.  I don't want to
read off the input what that is; I want to write the proper EOL
for the system on which Lua is running.