I want to delete some directories that contain mounted (--bind) subdirs. I use following for loop in a script file named .du
.
for dirname in $1; do
sudo umount $dirname/images/Spielplatz
sudo umount $dirname/sounds/Spielplatz
sudo rm -r $dirname
done
I call the script file with
.du Test*
to delete all directories that begin with "Test". But it only deletes the first one. So I have to call .du
for every directory.
How do I have to write it, so that it processes all of them with one call?