Skip to content

Instantly share code, notes, and snippets.

Created April 8, 2015 09:02
Show Gist options
  • Save anonymous/12614109e70660746bf1 to your computer and use it in GitHub Desktop.
Save anonymous/12614109e70660746bf1 to your computer and use it in GitHub Desktop.
open file
filename = ARGV.first
txt = open(filename)
puts "Here's your file #{filename}:"
print txt.read
print "Type the filename again: "
file_again = $stdin.gets.chomp
txt_again = open(file_again)
print txt_again.read
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment