B
Ben Anderson
Hi,
I have a bunch of files that I want to convert from CRLF to just LF.=20
How might I do this? I'm testing with the following example file
(steel.rb):
f =3D File.new("steel", "w")
f.syswrite("steel\ncity");
f.close
I then run this from cygwin and get the following output
Ben Anderson@andersonbd1 /cygdrive/c/ruby
$ ruby steel.rb
Ben Anderson@andersonbd1 /cygdrive/c/ruby
$ cat -v steel
steel^M
city
How might I get rid of the CR and just have ruby use an LF?
Thanks,
Ben
I have a bunch of files that I want to convert from CRLF to just LF.=20
How might I do this? I'm testing with the following example file
(steel.rb):
f =3D File.new("steel", "w")
f.syswrite("steel\ncity");
f.close
I then run this from cygwin and get the following output
Ben Anderson@andersonbd1 /cygdrive/c/ruby
$ ruby steel.rb
Ben Anderson@andersonbd1 /cygdrive/c/ruby
$ cat -v steel
steel^M
city
How might I get rid of the CR and just have ruby use an LF?
Thanks,
Ben