You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
161 B

  1. #!/usr/bin/env ruby
  2. args = ARGV
  3. filename = args[0]
  4. File.foreach(filename).with_index do |line, line_num|
  5. line_num += 1
  6. puts "#{line_num}: #{line}"
  7. end