#/bin/sh
# Example script to retrieve a list of observation for a list of stars
# from the ELODIE archive (get_elodie_obs.sh)
# Author: Philippe Prugniel, 2008-05-20
#-----------------------------------------------------------------------------
if test $# != 1 || test  "x$1" = "x-h" ||  test  "x$1" = "x--help" ; then
  echo "Search observations in Elodie Archive"
  echo "Usage: $0 <filename>"
  echo "where <filename> contains the list of names, one by line"
  echo "The list of observation is printed on the standard output and can be piped to "
  echo "get_elodie_spe.sh as eg:"
  echo "./get_elodie_obs.sh list.txt  | cut -c 47-59 | ./get_elodie_spe.sh"
  exit 0
fi
cat $1 | xargs -I{} wget --quiet "http://atlas.obs-hp.fr/elodie/E.cgi?a=t&n=0&c=o&o={}" -O- | grep -v -e ^! -e ^$
#--- End ---------------------------------------------------------------------






