#!/bin/csh -f
if ("$1" == "help") then
 echo "Script to go through root and correct file and directory permissions."
 echo "dbwilson 4/26/90"
 echo ""
 echo "syntax: permc"
 exit
endif
################################################################
if ($#argv == 1) then
  set root = $1
 else
  set root = /mit/cds
  endif
echo Searching through $root...
find $root -user $USER -type f -name '*.*' \! -name a.out -exec chmod a+r-x \{\} \;
find $root -user $USER -type d -exec chmod 775 \{\} \;
