您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

21 行
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