opt=$1
shift

amas=`setit`
noet=`echo $3 | awk ' {printf"%04d",$1} '`
case $LNG in
  fr) echo " Etoile $3 de $amas " > .T/e$noet.bin ;;
  eng) echo " Star $3 in $amas " > .T/e$noet.bin ;;
esac

case $opt in
 -bin|-bin1) zex $1 | grep $noet | awkbina >> .T/e$noet.bin ;;
 -bin2) zex vrad.irv | grep $noet > .T/vrad.out
        grep A .T/vrad.out | awkbin2 >> .T/e$noet.bin
        echo ' ' >> .T/e$noet.bin
        grep B .T/vrad.out | awkbin2 >> .T/e$noet.bin ;;
esac
echo ' ' >> .T/e$noet.bin
echo ' ' >> .T/e$noet.bin 


echo ' '
case $LNG in
  fr) echo -n " Voulez-vous editer le fichier (o/n) [n]?  ";;
  eng) echo -n " Do you want to edit the file (y/n) [n]?  ";;
esac
read rep
case $rep in
o|y) $EDT .T/e$noet.bin ;;
""|n) ;;
esac

clear
case $LNG in
  fr) echo " Recherche de periode pour l'etoile $3 dans $amas";;
  eng) echo " Period search for star $3 in $amas";;
esac

lucke $noet

clear
echo ' '
case $LNG in
  fr) echo -n " Voulez-vous supprimer les fichiers crees (o/n/c) ?  ";;
  eng) echo -n " Do you want to remove the created files (y/n/c) ?  ";;
esac
read sup
case $sup in
o|y) rm .T/e$noet.* ;;
n) ;;
c) rm -i .T/e$noet.* ;;
esac
