#!/bin/csh -f
# a script to identify the objects described in each descript.html
# file in subdirectories below $BEGINDIR
# Edited 9/19/1995 rcg Change BEGINDIR for GLOBEC.  Repeat for [0-9]
#	to catch year subdirectories
#
set BEGINDIR=/data/globec/objects/globec
set WHERE=`pwd`
cd $BEGINDIR

foreach i ( `find . -type d -print | grep "./[a-z]*"`)
  echo $i
  cd $i

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 $WHERE 

################

set BEGINDIR=/data/globec/objects/globec
set WHERE=`pwd`
cd $BEGINDIR

foreach i ( `find . -type d -print | grep "./[0-9]*"`)
  echo $i
  cd $i

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 $WHERE 
