Ruby write to file



examples/files/write_to_file.rb
if ARGV.length != 1
  puts "Usage: #{$0} FILENAME"
  exit
end

filename = ARGV[0]
File.write(filename, 'My first file')