#!/bin/csh -f set ADMIN=becci set SEMESTER=spr98 ########## set groups=(`ypcat group | grep '^cs' | sed -e 's/:.*//'`) cd /csinfo/www/courses/archive/$SEMESTER foreach directory ($groups) if (-d $directory) then chown -R $ADMIN $directory chgrp -R $directory $directory chmod -R u+rw $directory chmod -R g+rw $directory find $directory -type d -exec chmod g+xs {} \; endif end