How we can run the multiple instances of the script? I need to run the script which I am calling from the below function.I can doit with cron but I don't want to put it in the cron.This cript dploy the build and here I want when the build stage then it should run with multilpe instances of colodeolpyall script where it finds the new.txt file ..
/mnt/projects/stp2perf2_app_runtime/lamb/current.txt
/mnt/projects/stp2perf2_app_runtime/orbitgw/current.txt
/mnt/projects/stp2perf2_app_runtime/stp/wsHUB/current.txt
/mnt/projects/stp2perf2_app_runtime/stp/wsSTP/current.txt
/mnt/projects/stp2perf2_app_runtime/stpbatch/current.txt
/mnt/projects/stp2perf2_app_runtime/stpmon/current.txt
/mnt/projects/stp2perf2_app_runtime/stpscripts/current.txt
/mnt/projects/stp2perf2_app_runtime/stptools/current.txt
/mnt/projects/stp2perf2_app_runtime/tag/current.txt
[stp@VHLDVW stp]$ find /mnt/projects/stp2perf2_web_runtime/* -maxdepth 2 -name current.txt -type f
/mnt/projects/stp2perf2_web_runtime/gdesksrv/current.txt
/mnt/projects/stp2perf2_web_runtime/gdesksrv_lgcy/current.txt
/mnt/projects/stp2perf2_web_runtime/gdesksrv_ungt/current.txt
/mnt/projects/stp2perf2_web_runtime/npg/current.txt
/mnt/projects/stp2perf2_web_runtime/stp/gwSTP/current.txt
/mnt/projects/stp2perf2_web_runtime/stpinbound/current.txt
/mnt/projects/stp2perf2_web_runtime/stpproxy/current.txt
/mnt/projects/stp2perf2_web_runtime/stpscripts/current.txt
/mnt/projects/stp2perf2_web_runtime/stptools/current.txt
/mnt/projects/stp2perf2_web_runtime/stpweb/current.txt
calldeploy()
{
cd /projects/stp/stpbuild/logs/BuildLogs/
#Type=`grep "Build Type:" < ${LogFile} | awk -F"." '{print $NF}'`
Type=`cat ${LogFile} | grep -o "Stage" | uniq`
Pass=`grep "Result:" < ${LogFile} | awk -F"." '{print $NF}'`
if [[ ${Type} == "Stage" && ${Pass} == "SUCCESSFUL" ]];then
ssh -l stpuser VHLDVWSAD001 /projects/stp/stputils/deploy/colodeployall.sh &
fi
}
calldeploy