#!/bin/bash -f
function usage {
echo "
Enter a device and attribute, optionally preceded by 
plotz_devices options. Enter simply '-h' for more help, or go to 
https://confluence.slac.stanford.edu/display/ACCSOFT/Z-plots
 
  Examples:

  plotz_devices> pics:ltu1:% iact     LTU Protection Ion Chamber Currents
  plotz_devices> -l -b 52 VGXX:% P    Log plot of all combined 
                                      vacuum gauge readings in the 
                                      CathodeTo52SL2 beamline
  plotz_devices> -h                   Help
  plotz_devices> exit                 To exit plotz_devices
"
}

usage;
while read -ep "plotz_devices> " && [ x"$REPLY" != x"exit" ]
do
  if [ x"$REPLY" != x"" ]; then 
    plotz_devices $REPLY
  fi
done




