runRequest 593 Bytes
#!/bin/bash
# Prepare & Run Request

tgt=$1 # prefix
tgt_vi=$2
src_vi=$3
TaoStop=$4
SwStop=$5

. $(dirname $BASH_SOURCE)/env.sh

 case $src_vi in
	omni_hour_all)
		src=omni
	;; 
	ace_swepam_real)
		src=ace
	;;
 esac

 # delete results of previous calculations
 rm -rf $SW2NC/$tgt* $SW2DATA/$src/$tgt*
 
 # delete previous requests 
 rm -f $REQ/*.xml 

 cd $SW2ROOT/Bin.py; python makeRequest.py $tgt $tgt_vi $src_vi $TaoStop $SwStop  > log
 DDLogin $DDUSER $DDPWD >> log
  
	
 # run newly created Request
 for request in $REQ/$tgt*.xml
  do
	python run.py $tgt $src $request & echo $!
  done