- regex=`echo $excludedirs | sed -e 's/ /.*\\\\|/g'`
- regex=`echo "'\($regex.*\)'"`
- find $backupdirs -type $type -o -regex $regex -prune -o -printf "$findformat"
+ echo $excludedirs | sed -e 's/ /\n/g' > $tmpdir/excluded
+ find $backupdirs -type $type -printf "$findformat" | grep -z -v -f $tmpdir/excluded