for direc in cp9[7]alld do echo doing $direc find $direc | grep htm | while read file do out=`echo $file | sed -e 's/html/htm/'` echo $file -- $out #nmv $file $out #do_sed.sh list1sed.cmd $out do_sed.sh list1sed.cmd $file done done