#trovagerarchia nomedir nomefile for i in * do if test -d $i -a -x $i then cd $i if test $i = $1 then echo Trovata gerarchia `pwd` trovafile $2 if test -s /tmp/temp then echo Dammi il nome del file su cui appendere read f filtro `cat /tmp/temp` >> $f rm /tmp/temp fi fi trovagerarchia $1 $2 cd .. fi done