#! /bin/bash # @(#) Print contents of sub-directory # [ $# -eq 0 ] && set - `ls` while [ $# -gt 0 ] do if [ -d $1 ]; then n=`ls $1 | wc -l ` echo $1 contains $n file fi shift done