揮発性のメモ2

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

ディレクトリごとに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