#!/bin/csh -f
# a script to identify the objects described in each descript.html
# file in subdirectories below $BEGINDIR
#
echo "This script is a simple-minded search for files named 'descript.html'."
echo "It assumes that you are running it as the user who owns the JGOFS system."
echo ""
set STARTWHERE=/data/globec
cd
set BEGINDIR=$STARTWHERE/objects/
cd $BEGINDIR

foreach i ( `find . -type d -print | grep "./[a-z]*"`)
####rcg needed? #### foreach i ( `find . -type d -print | grep "./[0-9]*"`)

  echo $i
  cd $i
  if (-e object.list) \rm object.list
nawk '\
BEGIN {ok=0}\
/^[A-z0-9].+$/ {ivar=$0;ok=1-ok}\
ivar == $0 && ok == 1 {print $0} ' descript.html >object.list

cd $BEGINDIR
end
cd $STARTWHERE 
