2015-04-07 ファイル 行数 取得 Ruby # ファイルの行数取得 def get_file_row_num(filepath) count = %x{sed -n '=' #{filepath} | wc -l}.to_i return count end