box-o-sand/lrthw-remnants/ex15-ec.rb
Dan Buch 01e5a4e45f Add 'lrthw-remnants/' from commit '2b0a814a1795c60baf29b95462921b0ec8c7d861'
git-subtree-dir: lrthw-remnants
git-subtree-mainline: f2380eef05
git-subtree-split: 2b0a814a17
2013-01-09 23:47:30 -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