#!/bin/bash
#!/bin/sh
#==============================================================
# cagetSPEARPVs.bash 
#
# Facility:  LCLS
#
# Rem:   for Jim Turner:
#        - caget SPEAR:InjectState every 10 minutes and write along with timestamp to 
#          /nfs/slac/g/lcls/dev/matlab/spearstatus/InjectState_val.txt
#        - run with trscrontab as laci on lcls-prod01 every 10 minutes
#
# Auth:  12-May-2010, Judy Rock (jrock)
# Mods   dd-mmm-yyyy who what
#--------------------------------------------------------------

. /afs/slac/g/lcls/tools/script/ENVS.bash

export EPICS_CA_ADDR_LIST=$EPICS_CA_ADDR_LIST" 134.79.35.245:5100"

echo `date +'%d/%m/%Y %H:%M:%S'` `caget -t SPEAR:InjectState` >> /nfs/slac/g/lcls/dev/matlab/spearstatus/InjectState_val.txt

