#! /bin/sh

CDIR=`pwd`

/bin/echo -e "\nDirectories searched:"

for dir
do
  cd $CDIR
  cd $dir
  /bin/echo $dir
  grep bic *.f?? >> /tmp/bic$$.tmp
done

/bin/echo -e "\nParmfiles sorted by bic values:"

#sed -e s/-0/\ -/g /tmp/bic$$.tmp > /tmp/bic$$.dat
#sort -k 4,5 < /tmp/bic$$.dat

sort -g -k 5 < /tmp/bic$$.tmp

rm -f /tmp/bic$$.*

