#Jaideep Singh #October 2003 #INPUT: a list of filenames for every halog entry #a file is understood to be a start/end of run summary halog entry if the keyword contains "Start" or "End" AND the user name is "a-onl" (for right arm) or "adev" (for left arm) #OUTPUT: two column file #column one is the run number, which in this case is the 7th word from the first line in the file with the text "EPICS data" #column two is the filename of the file BEGIN {OFS = "\t"} /User/ {daq = $3 ; next} /keyword/ {keyword = $0 ; next} #/EPICS data/ { runnum = $7 ; if (!((keyword ~ /=Start/)&&(daq=="a-onl"))) {nextfile} else {print runnum,FILENAME >> "right.beg" ; nextfile}} /EPICS data/ { runnum = $7 ; if (!((keyword ~ /=End/)&&(daq=="a-onl"))) {nextfile} else {print runnum,FILENAME >> "right.end" ; nextfile}} #/EPICS data/ { runnum = $7 ; if (!((keyword ~ /=Start/)&&(daq=="adev"))) {nextfile} else {print runnum,FILENAME >> "left.beg" ; nextfile}} #/EPICS data/ { runnum = $7 ; if (!((keyword ~ /=End/)&&(daq=="adev"))) {nextfile} else {print runnum,FILENAME >> "left.end" ; nextfile}}