opt=$1
shift
FS=$1
shift
TY=$1
shift

case $opt in
-lt) (cat $ENT/$TY.ent ; zex $FS | awkmkp `tscod $1` | tee $SRT) | page ;;
-gt) (cat $ENT/$TY.ent ; zex $FS | awkmkg `tscod $1` | tee $SRT) |  page ;;
 -i) (cat $ENT/$TY.ent ; zex $FS | awkmki `tscod $1` `tscod $2` | tee $SRT)| \
      page ;;
-eq) (cat $ENT/$TY.ent ; zex $FS | grep -i "$*" | tee $SRT )| more ;;
esac

awk ' { print $1 } ' $SRT | sort -nu > $BTP/liste.noet
echo ' '
case $LNG in
  fr) echo "	 Etoiles selectionnees:  "`grep -c '^.' $BTP/liste.noet` ;;
 eng) echo "	 Selected stars:  "`grep -c '^.' $BTP/liste.noet` ;;
esac
