improved spacem method to handle unwritable names better (where perl was not happy...
[feisty_meow.git] / scripts / files / count_files_in_subdirs.sh
1 #!/bin/bash
2 dirs=($*)
3 if [ -z "$dirs" ]; then dirs=($(find . -mindepth 1 -maxdepth 1 -type d ) ); fi
4 #echo dirs are ${dirs[*]}
5 for i in "${dirs[@]}"; do
6   echo -n $(ls -1 $i | wc -l)
7   echo -e "\t\t$i"
8 done
9