Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
see what a file would look like on Windows
#!/usr/bin/env ruby
if ARGV.count == 1 && ARGV[0] != 0
contents = File.read(ARGV[0])
puts contents.gsub("\r\n","#VALID_LINE_BREAK#").gsub("\n","").gsub("\r","").gsub("#VALID_LINE_BREAK#", "\r\n")
else
puts "Invalid argument"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.