2015-04-05から1日間の記事一覧

Rubyでファイル行数を取得する

Linuxコマンドの wc -l を使用。 count = %x{sed -n '=' #{filepath} | wc -l}.to_i p count