|
Your code is a little wrong there in your assigning multiple directories to the docroot and adding a newline. No need for the new line. Set confd to "$docroot" not "$docroot\n". When you do the find $confd it will put a newline in command line where it doesn't belong.
#while [ $i -le $doccount ]
# do
# confd="$docroot\n"
#echo $confd
confd="$docroot"
find $confd -type d -perm /o=w | while read DIR
which would be
find /var/www/html /var/www/test/www.example.com /var/www/www.example.com -type d -perm /o=w | while read DIR
|