I am having problems constructing text files from a Windows machine to be read on a Linux environment.
def test
my_file = Tempfile.new('filetemp.txt')
my_file.print "This is on the first line"
my_file.print "\x0A"
my_file.print "This is on the second line"
my_file.close
FileUtils.mv(my_file.path, "C:/Users/me/Desktop/Folder/test.usr")
end
0A
is the ASCII code for line feed, yet when I open the resulting file in Notepad++, I see it has appended CR and LF on the end of the line.
How do I add only a Line Feed as the new line character?