]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/scripts/OCDBscan/makeRunList.sh
Makeing run list for the OCDB browser
[u/mrichter/AliRoot.git] / TPC / scripts / OCDBscan / makeRunList.sh
1 #!/bin/bash
2
3 # Create the file  run.list to be processed
4 # Aruments
5 # 1   -  prefix
6 # Example usage
7 # $ALICE_ROOT/TPC/scripts/OCDBscan/makeRunList.sh /alice/data/2010
8
9
10 prefix=$1
11 alien_find $prefix/OCDB/GRP/GRP/Data Run            > grp.list
12 alien_find $prefix/OCDB/TPC/Calib/HighVoltage  Run  > hv.list 
13
14 for afile in `cat hv.list | grep root`; do 
15     bfile=`basename $afile`; 
16     echo $bfile  | sed s/_/\ / | sed s_Run__ | gawk '{print $1 }' 
17 done &> hvRun.list
18 sort  hvRun.list > hv.list
19
20 for arun  in `cat hv.list`; do 
21     grpstatus=`cat grp.list | grep $arun`
22     if [ -n $grpstatus ] ; then
23       echo $arun
24     fi;
25 done > hvRun.list
26
27 sort  hvRun.list > run.list
28