source: branches/Mars_McMismatchStudy/qsub/FACT.sub_gan_mc.sh@ 18262

Last change on this file since 18262 was 17986, checked in by ghughes, 10 years ago
batch scripts update
  • Property svn:executable set to *
File size: 860 bytes
Line 
1#!/bin/bash
2
3if [[ $# < 1 ]]
4then
5 echo ""
6 echo "FACT.sub_gan_mc.sh <input dir> <output dir>"
7 echo ""
8 exit
9fi
10
11cd $MARSSYS
12
13INDIR=$1
14OUTDIR=$2
15
16TEMPFILE="temp.gan.file"
17
18#NEED editing
19# TODO
20ls $INDIR/cer* | head -n 1 > $TEMPFILE
21
22while read LINE
23do
24
25 INFILE=$LINE
26
27#NEED editing
28# TODO
29 NUMBER=`echo $LINE | sed s/cer/" "/g | gawk '{print $2}'`
30
31 QSUB=$MARSSYS"/batch/queue/FACT.qsub_gan_mc_"$NUMBER".sh"
32 QSUBERR=$MARSSYS"/batch/queue/FACT.qsub_gan_mc_"$NUMBER".err"
33 QSUBOUT=$MARSSYS"/batch/queue/FACT.qsub_gan_mc_"$NUMBER".out"
34
35 sed -e "s|FFFFF|$INFILE|" \
36 -e "s|DDDDD|$OUTDIR|" $MARSSYS"/batch/FACT.qsub_gan_mc.sh" > $QSUB
37
38 chmod +x $QSUB
39
40 ##qsub -q fact_medium -b yes -o $QSUBOUT -e $QSUBERR $QSUB
41 qsub -q test -b yes -o $QSUBOUT -e $QSUBERR $QSUB
42 ##qsub -b yes -o $QSUBOUT -e $QSUBERR $QSUB
43
44done <$TEMPFILE
45
46rm $TEMPFILE
Note: See TracBrowser for help on using the repository browser.