d=-2 f=0 for fich in * .* do if [ -d $fich ] then d=`expr $d + 1` else f=`expr $f + 1` fi done echo "Il y a $d repertoires et $f fichiers"