#!/bin/sh cd $1 case $1 in */$2) flist="" for file in *; do if test -f $file -a -r $file then s=`cat $file | wc -c` if test $s -eq $3 then flist="$flist $file" fi fi done if test ! -z "$flist" then echo "trovato direttorio: `pwd`, $flist" # here we call the filter fi ;; *) ;; esac # recursive part for file in *; do if test -d $file -a -x $file then soluzione_slave.sh `pwd`/$file $2 $3 fi done exit