box-o-sand/oldstuff/lrthw-remnants/ex15-ec.rb
2015-06-22 13:15:42 -05:00

19 lines
283 B
Ruby

filename = ARGV.first
prompt = "> "
txt = File.new(filename)
puts "Here's your file: #{filename}"
puts txt.read
puts "I'll also ask you to type it again:"
print prompt
file_again = STDIN.gets.chomp
txt_again = File.new(file_again)
puts txt_again.read
txt.close
txt_again.close