Easily count files per subdirectory in bash
#!/bin/sh for file in * do if [ -d "$file" ]; then echo $file ":" `ls $file | wc -l`; continue fi done exit 0
#!/bin/sh for file in * do if [ -d "$file" ]; then echo $file ":" `ls $file | wc -l`; continue fi done exit 0