#!/bin/bash if [[ $# < 1 ]] then echo "" echo "FACT.sub_ceres_mc.sh " echo "" exit fi cd $MARSSYS INDIR=$1 OUTDIR=$2 TEMPFILE="temp.ceres.file" ls $INDIR/cer* | head -n 1 > $TEMPFILE while read LINE do INFILE=$LINE NUMBER=`echo $LINE | sed s/cer/" "/g | gawk '{print $2}'` QSUB=$MARSSYS"/batch/queue/FACT.qsub_ceres_mc_"$NUMBER".sh" QSUBERR=$MARSSYS"/batch/queue/FACT.qsub_ceres_mc_"$NUMBER".err" QSUBOUT=$MARSSYS"/batch/queue/FACT.qsub_ceres_mc_"$NUMBER".out" sed -e "s|FFFFF|$INFILE|" \ -e "s|DDDDD|$OUTDIR|" $MARSSYS"/batch/FACT.qsub_ceres_mc.sh" > $QSUB chmod +x $QSUB ##qsub -q fact_medium -b yes -o $QSUBOUT -e $QSUBERR $QSUB qsub -q test -b yes -o $QSUBOUT -e $QSUBERR $QSUB ##qsub -b yes -o $QSUBOUT -e $QSUBERR $QSUB done <$TEMPFILE rm $TEMPFILE