#! /bin/sh
# Fdata file_template
# determine if FERRET data files matching file_template are currently on-line by
# searching the paths in FER_DATA

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

found=0
for subdir in ${FER_DATA} ; 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

