I have a script which in turn triggers 4 more scripts in another server sequentially. My script is waiting until the first script completes in target server and then triggers the second one. Below is the code
SCB_CMD=/sc/db2home/scbinst/bin/reload_scrpt1.sh
SCB_LOG=/sc/db2home/scbinst/log/reload_scrpt1.log
echo `date` "Executing $SCB_HOST:$SCB_CMD ..."
ssh $SCB_HOST "$SCB_CMD | tee $SCB_LOG"
RC=$?
#---------------------------------------------------------------------------
# -- Check for errors
#---------------------------------------------------------------------------
if [ $RC -ne 0 ]
then
echo `date` "!error occurred executing SCB load script1!"
exit 99
fi
#---------------------------------------------------------------------------
SCB_CMD=/sc/db2home/scbinst/bin/reload_scrpt2.sh
SCB_LOG=/sc/db2home/scbinst/log/reload_scrpt2.log
#---------------------------------------------------------------------------
# -- Execute the remote load script
#---------------------------------------------------------------------------
echo `date` "Executing $SCB_HOST:$SCB_CMD ..."
ssh $SCB_HOST "$SCB_CMD | tee $SCB_LOG"
--------------------------------------------
Is there a way to trigger all these four scripts in parallel in target server?