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

tgt_vi=$1
src_vi=$2
TaoStop=$3
SwStop=$4

. $(dirname $BASH_SOURCE)/env.sh

 IFS='_' read -r -a array <<< "$tgt_vi"
 tgt=${array[0]}
 
 # 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_vi $src_vi $TaoStop $SwStop  > log
 DDLogin $DDUSER $DDPWD >> log
  
	
 # run newly created Request
 # can be launched as stand alone executable
 for request in $REQ/$tgt*.xml
  do
	python run.py $tgt $request  & echo $!
  done