揮発性のメモ2

http://d.hatena.ne.jp/iww/

2014-10-23から1日間の記事一覧

ディレクトリごとにCSVファイルの数を数えて出力

#!/bin/sh DIR=$1 DLIST=`find $DIR -type d` for D in $DLIST; do COUNT=`find $D -maxdepth 1 -iname "*.csv"|wc -l` if [ "$COUNT" -gt 0 ]; then echo $D:$COUNT fi done