source: branches/Mars_McMismatchStudy/qsub/FACT.sub_gan_data.sh@ 18237

Last change on this file since 18237 was 17984, checked in by ghughes, 10 years ago
mixed some major bigs, removed hardcoded directory stuff, some minor testing still needed but batch full
  • Property svn:executable set to *
File size: 840 bytes
Line 
1#!/bin/bash
2
3if [[ $# < 1 ]]
4then
5 echo ""
6 echo "FACT.sub_gan_data.sh <runlist>"
7 echo ""
8 echo "<runlist> should be in the form DIRECTOR FILE eg:"
9 echo "/home/guest/ghughes/FACT/Mars_McMismatchStudy/OUTPUT/star/20131001/ 20131001_074_I.root"
10 echo ""
11 exit
12fi
13
14cd $MARSSYS
15
16INFILE=$MARSSYS"/batch/"$1
17
18while read LINE
19do
20
21 NAME=`echo $LINE | gawk '{print $2}' | grep root | sed s/.root//g`
22 echo $LINE > $NAME.list
23
24 QSUB=$MARSSYS"/batch/queue/FACT.qsub_gan_data_"$NAME".sh"
25
26 QSUBERR=$MARSSYS"/batch/queue/FACT.qsub_gan_data_"$NAME".err"
27 QSUBOUT=$MARSSYS"/batch/queue/FACT.qsub_gan_data_"$NAME".out"
28
29 sed -e "s|NNNNN|$NAME|" $MARSSYS"/batch/FACT.qsub_gan_data.sh" > $QSUB
30
31 chmod +x $QSUB
32
33 ##qsub -q fact_medium -b yes -o $QSUBOUT -e $QSUBERR $QSUB
34 qsub -q test -b yes -o $QSUBOUT -e $QSUBERR $QSUB
35
36done <$INFILE
Note: See TracBrowser for help on using the repository browser.