Runs @ prompt but not in script

I have a shell script with two 'find' commands.
The first deletes files older than a week and the second deletes any resulting empty directories.

find /mnt/myvol/.recycle/* -atime +7 -exec rm -rf '{}' \;
find /mnt/myvol/.recycle/ -depth -type d -empty -exec rmdir {} \;

When I run the shell script the files get deleted but the directories, which are indeed empty, do not.
However, if I run type the second 'find' command at a shell prompt without the terminating \; the directories do get deleted.

What would cause the command to run OK at a shell prompt but not from within a shell srcript?
 
Back
Top