Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

21 wiersze
426 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. if line.start_with?('|')
  8. # Skip table schema lines
  9. if line.eql? "|---|---|---|---|---|\n"
  10. next
  11. end
  12. values = line.split("|")
  13. values.each.with_index do |v, vn|
  14. puts "#{vn}: #{v}"
  15. end
  16. end
  17. end