#Figure out what user 's have a public_html folder # for $webdir in "/home/*/public_html" do #Create a /var/www/"SomeUser" folder for each user with a public_html in /home # mkdir -p `echo $webdir | sed 's#/home/#/var/www/#g' | sed 's#/public_html##g'` #Mount each users public_html folders read-only to /var/www/"SomeUser" # # this is the line I can not get to behave... # mount --bind $webdir `echo $webdir | sed 's#/home/#/var/www/#g' | sed 's#/public_html##g'` done