shift
FB=$BDA/bibliographie/biblio
FK=$BDA/bibliographie/key
BIBO=$BTP/bib.out

a1=93 
a2=93

case $LNG in
fr) MOT="Mot cle"
    MOTS="Mots cle";;
eng)MOT="Keyword"
    MOTS="Keywords" ;;
esac

case $1 in
-n) name=$2 ; shift ; shift 
    case $1 in
      -a) a1=$2 ; a2=$2 ; shift ; shift ;;
      -i) a1=$2 ; a2=$3 ; shift ; shift ; shift ;;
      -g) a1=$2 ; a2=93 ; shift ; shift ;;
      -p) a1=69 ; a2=$2 ; shift ; shift ;;
    esac
    until test $a1 -gt $a2 
    do
    echo -n  " Bibliography 19$a1 " 
    zex $FB.$a1 | grep $name |awkpr1 > $BIBO
    nref=`grep -c $a1 $BIBO`
    case $nref in
     0) echo '  Nothing!' ; echo ' ' ;;
     *) echo ' ' ; zex $FB.$a1 | bibg ;;
    esac
    a1=`expr $a1 + 1` 
    done | more 
    exit 0 ;;    
-i) a1=$2 ; a2=$3 ; shift ; shift ; shift ;;
-a|-eq) a1=$2 ; a2=$2 ; shift ; shift ;;
-g|-gt) a1=$2 ; a2=94 ; shift ; shift ;;
-p|-lt) a1=69 ; a2=$2 ; shift ; shift ;;
-k) zex $BDA/bibliographie/mot.cle | pr -t -3 | page
    echo ' ' ; exit 0 ;;
-ki) echo ' ' ; echo 'Liste des mots cle ' ; echo ' '
     zex $BDA/bibliographie/mot.cle | grep "^$2" 
     echo ' ' ; exit 0 ;;
-ke) echo ' ' ; echo 'Liste des mots cle ' ; echo ' '
     zex $BDA/bibliographie/mot.cle | grep "$2$" 
     echo ' ' ; exit 0 ;;
-km) echo ' ' ; echo 'Liste des mots cle ' ; echo ' '
     zex $BDA/bibliographie/mot.cle | grep "$2" 
     echo ' ' ; exit 0 ;;
-t) zex $FK.$2 | awkpr1 | sort -n -u | wc -l
    exit 0 ;;
-w) case $# in
    3) zex $FK.$2 | grep $3 | awkpr1 > $BIBO ; echo ' '
       echo "$MOT (19$2) : $3 : `cat $BIBO | wc -l` references" 
       echo ' ' ; exit 0 ;;
    4) zex $FK.$2 | grep $3 | grep $4 | awkpr1 > $BIBO ; echo ' '
       echo "$MOTS (19$2) : $3 $4 : `cat $BIBO | wc -l` references" 
       echo ' ' ; exit 0 ;;
    5) zex $FK.$2 | grep $3 | grep $4 | grep $5 | awkpr1 > $BIBO ; echo ' '
       echo "$MOTS (19$2) : $3 $4 $5 : `cat $BIBO | wc -l` references" 
       echo ' ' ; exit 0 ;;
    esac ;;
-h) emploi bib ; exit 0 ;;
-c) echo ' '
    for i in `cat $BIBO | awk ' {print $1} '`
      do 
      zex $FK.$2 | grep $i
      done 
    echo ' '
    exit ;;
esac

until test $a1 -gt $a2 
do
echo -n  " Bibliography 19$a1 " 
case $# in
  1) zex $FK.$a1 | grep -i $1 > $BIBO ;;
  2) zex $FK.$a1 | grep -i $1 | grep -i $2 > $BIBO ;; 
  3) zex $FK.$a1 | grep -i $1 | grep -i $2 | grep -i $3 > $BIBO ;; 
esac
nref=`grep -c $a1 $BIBO`
case $nref in
  0) echo '  Nothing!' ; echo ' ' ;;
  *) echo ' ' ; zex $FB.$a1 | bibg ;;
esac
a1=`expr $a1 + 1` ;
done | more

echo ' '
