#! /usr/bin/env ruby require 'csv' def check_args file = ARGV[0] if file.nil? puts "Usage: ./tsv.rb [FILE]" exit 1 end unless File.exist?(file) puts "[ERROR] Can't read file. File path = #{file}" exit 1 end end # main check_args file = ARGV[0] csvDatas = CSV.read(file, col_sep: "\t", headers: false) csvDatas.each do |row| puts row[0] puts row[1] # ... end ã¯ã¾ã£ããã¤ã³ã1 CSV.read(file, col_sep: "\t", he
{{#tags}}- {{label}}
{{/tags}}