>I tried the script on a RedHat Linux, and... well... I can't erase the
>directory now ;-)
> I wonder if anyone of you knows the problem, and can help me with
>that..
It's a widespread problem, Solaris tools get just as confused (although
nothing coredumped on me). The script, btw, can be expressed as a perl
one-liner:
perl -e '$a = shift; while(mkdir($a, 0755)) { chdir $a; }' <dir>
which will go as deep as your OS allows. To get rid of it, try
perl -e '$a = shift; 1 while(chdir($a));
do { chdir("..") } while(rmdir($a));' <dir>
where <dir> is the name of the directory tree you want to create/delete.
zw