]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/scripts/filterRecLog.sh
8dfadf40afe6a7e165a4331d58daf6abee85f5e8
[u/mrichter/AliRoot.git] / TPC / scripts / filterRecLog.sh
1 # marian.ivanov@cern.ch
2 # Filter error logs 
3 # Input   - errRec.logs  - text file with the list of error logs
4 # Output  - seg.log      - text file with the seg.faults runs
5 #         - segout.log   - text file with the output of the seg.fault runs
6 #                        - the err.log and out.log suppose to be in the same directory
7 # to get the list of logs:
8 # example:
9
10 isOK=0 
11 nonOK=0
12 rm seg.log
13 rm segout.log
14 rm abort.log
15 rm abortout.log
16 for efile in `cat errRec.log`  ;do
17  xxx=`cat $efile| grep segmentation`
18  if [ -z "$xxx" ]
19  then
20   let isOK=isOK+1
21   else
22   let nonOK=nonOK+1
23   echo nonOK=$nonOK
24   echo "$efile" >>seg.log
25   echo $efile
26   ofile=`echo $efile| sed s_err_out_`
27   cat $ofile >> segout.log
28  fi     
29  xxx=$xxx`cat $efile| grep Aborted`
30 if [ -z "$xxx" ]
31  then
32   let isOK=isOK+1
33   else
34   let nonOK=nonOK+1
35   echo nonOK=$nonOK
36   echo "$efile" >>abort.log
37   echo $efile
38   ofile=`echo $efile| sed s_err_out_`
39   cat $ofile >> abortout.log
40  fi
41 done; 
42 #get the list
43 echo isOK=$isOK nonOK=$nonOK