cmdtest/t/bin/echo_crnl.rb
Johan Holmberg 9505af3dcc improve line ending detection + add tests
should hopefully work on Linux and Windows now
2016-11-16 22:34:00 +01:00

13 lines
189 B
Ruby
Executable File

#!/usr/bin/ruby
STDOUT.binmode
for arg in ARGV
arg = arg.dup
if arg.sub!(/:rn$/, "")
print arg + "\r\n"
elsif arg.sub!(/:n$/, "")
print arg + "\n"
end
end