2010-03-14から1日間の記事一覧
■変更点 読み込めるファイルを.txtと.csvに限定 文字列判定に比較演算子(=~)を使用 file_path = ARGV[0] search_str = ARGV[1] if /^(txt|csv)$/i !~ file_path.split(".").[](-1) puts "扱えないファイルです。" exit endtemp_lines = [] File.open(file_…
■変更点 読み込めるファイルを.txtと.csvに限定 文字列判定に比較演算子(=~)を使用 file_path = ARGV[0] search_str = ARGV[1] if /^(txt|csv)$/i !~ file_path.split(".").[](-1) puts "扱えないファイルです。" exit endtemp_lines = [] File.open(file_…