#! /bin/sh
# Fdescr file_template    
# determine if FERRET descriptor files matching template are currently on-line
# by searching the paths in FER_DESCR

if [ $# -ne 1 ]; then
   echo "usage: Fdescr descriptor_file_template"
   exit
fi

found=0
for subdir in ${FER_DESCR}; do
   filelist=`cd "${subdir}" ; find * -maxdepth 0 -type f -name \*"$1"\* -print`
   if [ -n "${filelist}" ]; then
      echo "* * * * * * * * in ${subdir}"
      ( cd "${subdir}" ; /bin/ls -l ${filelist} )
      found=1
      echo " " 
   fi
done

if [ ${found} -eq 0 ]; then
   echo "No files matching '$1' were found"
fi

