countUnzipped.sh 223 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. if [ $# -lt 1 ] ; then
  3. echo Usage $0 DIR;
  4. exit 0;
  5. fi;
  6. aDirs=($(echo $1/*/));
  7. aZips=($(echo $1/*.zip));
  8. nDir=${#aDirs[@]}
  9. echo $nDir/${#aZips[@]};
  10. for ((i=0;i<nDir;i++)) ; do
  11. echo ${aDirs[$i]};
  12. done;