#! /bin/csh -f # # Register a commissioning change with some kind of "change log" # if(! $?beamline) then # default to beamline this computer belongs to setenv beamline `beamline.com` if($status) then echo "ERROR: $beamline" exit 9 endif endif #if(! $?beamline) setenv beamline 831 foreach logfile ( /data/log/change.log ~/change.log ) touch $logfile >& /dev/null if(! $status) break end # record the date and Flux monitor readings in gnuplot-readable format flux.com |\ awk 'NR==1{printf "%s %s %s %s ", $2, $3, $4, $6} /eV/{printf "energy: %s Hdiv: %s Vdiv: %s ",$1, $(NF-2), $NF} /^I/{printf "%s %s ", $1, $2}' |\ cat >> $logfile echo "bl$beamline $*" >> $logfile