From: Bill Kelly Date: 2005-12-30T07:46:06+09:00 Subject: Re: create file with LF (not CRLF) in windows From: "Ben Anderson" > > I have a bunch of files that I want to convert from CRLF to just LF. > How might I do this? I'm testing with the following example file > (steel.rb): > > f = File.new("steel", "w") > f.syswrite("steel\ncity"); > f.close Try in "binary" mode. f = File.new("steel", "wb") BTW, if you use blocks, you can omit the f.close: File.new("steel", "wb") do |f| f.print("steel\ncity") end (See also IO#binmode ) Regards, Bill