Skip to content

Instantly share code, notes, and snippets.

Created October 25, 2012 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3950163 to your computer and use it in GitHub Desktop.
Save anonymous/3950163 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
if ARGV.length > 0
counter = 0
file = File.new(ARGV[0], "r")
while (line = file.gets)
puts "#{counter}: #{line}"
counter = counter + 1
end
file.close
else
puts "No file could be read"
end
puts " * * Press enter to continue * * "
STDOUT.flush
city = gets.chomp
puts city
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment