kurahaupo 1666744912 learn "scripts are safer with set -e" … oh really? try this: find $( t=$( cat trashpattern ) ; find -name "${t:-Trash}" -type d ) -mindepth 1 -mtime +7 -delete # now add set -e and remove the file trashpattern