Hi
I have a file say xyz.sh, whose contents are as follows :
***************************
#! /bin/ksh
set -x
. /a.sh
. /b.sh
. /c.sh
*****************************
Now will this execute all the three process simultaneously or sequentially?
If it will process simultaneously, is there any way to make it excecute sequentially.
Thanks in advance
Pankaj
It should execute sequentially as per the above logic.
Hi
Thanks a lot
Suppose above code is wrapped in a file called all.sh , I have another sh script ( reject.sh ) which is dependent on all.sh.
reject.sh should only be fired if all.sh has finished successfully. In case of any error in all.sh , the dependent job ( reject.sh ) must be suspended and a warning mail should be sent. Can u please provide the code whic fullfills these conditions.
Regards
Pankaj
Suppose your all.sh is as follows:
#!/bin/sh
if cp "$1" "$1.bak"
then
exit
else
echo "bkedit quitting: can't make backup?" 1>&2
exit 1
fi
And here is a wrapper script:
. /all.sh
if [[ $? -eq 0 ]]; then
. /reject.sh
else
mail abc@abc.com
fi
Regards,
Tayyab