#!/bin/bash if [ $# -lt 1 ] ; then echo Usage $0 DIR; exit 0; fi; aDirs=($(echo $1/*/)); aZips=($(echo $1/*.zip)); nDir=${#aDirs[@]} echo $nDir/${#aZips[@]}; for ((i=0;i<nDir;i++)) ; do echo ${aDirs[$i]}; done;