Rubyã§CSVãã¡ã¤ã«ãèªã¿è¾¼ãã§ãæ°è¦ã®CSVãã¡ã¤ã«ã«æ¸ãè¾¼ãã FasterCSVã¨ããgemã使ã£ãæ¹ãéããããããããã¦ã¹ã«ã¼ã æ°è¦CSVãã¡ã¤ã«ã«æ¸ãè¾¼ã CSVãã¡ã¤ã«ãèªã¿è¾¼ãã§ãä¸é¨ãç½®æãããã®ãæ°è¦CSVã¨ãã¦ä¿åããã File.openã¯ãã¡ã¤ã«ãªãã¸ã§ã¯ããè¿ãããCSV.openã¯ãããã¯ã渡ãã¨ãåè¡ã®é åãè¿ãã require 'csv' path = ARGV.shift new_csv = File.join(File.dirname(path), 'hoge.csv') rows=[] CSV.open(path, 'r') do |row| row[0].gsub! /hoge/, "hage" rows << row end CSV.generate(new_csv) do |writer| rows.each {|row| writer
{{#tags}}- {{label}}
{{/tags}}