The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 01-07-2009
BubbaJoe's Avatar
BubbaJoe BubbaJoe is offline
Registered User
  
 

Join Date: Oct 2008
Location: St Louis
Posts: 153
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