#!/bin/csh 
# copy files for backup purposes
# Created 28 April 2000

set backup_dir = /usr/local/backup

set redhat1    = $backup_dir/redhat/etc
#set redhat2    = $redhat1/profile.d
set redhat2    = $backup_dir/redhat/etc

set all_dir    = ($redhat1 $redhat2)

foreach j ($all_dir)
  cd $j
  foreach i (*)
    if ! { diff $i /etc/$i } then
      echo Different $i found
      cp /etc/$i .
      echo $i copied to $j
    endif
  end
end

1