I have 4 scripts example script1,script2,script3,script4 .
I have to run script1,script2 and script3 parallely since this 3 scripts dont have dependencies .
Once script1,script2 and script3 got completed successfully , I have to trigger script4.
Can someone help me on this how to right script for this!!!
I have 4 scripts example script1,script2,script3,script4 .
I have to run script1,script2 and script3 parallely since this 3 scripts dont have dependencies .
Once script1,script2 and script3 got completed successfully , I have to trigger script4.
Can someone help me on this how to right script for this!!!
Thanks,
Vinoth
Hi vinothsekark,
You can try as follows, not tested though.
kindly try it in a non live environment as it is not tested and let us know.
EDIT: Sorry sea seems we have updated the post on same time didn't see your question.
Thanks,
R. Singh
Last edited by RavinderSingh13; 10-14-2014 at 02:37 AM..
Reason: Adding sorry, as sea asked a question to OP+edited space thanks to sea
The same could be achieved with
However this wil also not test the return codes of the background scripts..
The challenge is to reliably capture those before script 4 can continue...
Something like this perhaps (not tested)
Last edited by Scrutinizer; 10-15-2014 at 01:24 AM..
This User Gave Thanks to Scrutinizer For This Post:
The capture whether the script is running or not - is easy, at least when compared to the challenge transporting the exit value out of the subshell to that this handler script knows it, which script has exited with which exit code.
I would have a solution for this at hand, but I'm afraid it works only with 1 background process at a time (that is pseudo-copied to below example).
Either way, it forces you to send a more complex command in the background process, adapt to all 3 files.
Then catch the result of those ./script[1-3]_ret files within a loop, and it should be fine.
Hope this helps
EDIT:
Just for the challenge I've written a script, but not going to post until TO has posted his efforts.
Last edited by rbatte1; 10-14-2014 at 07:15 AM..
Reason: Spelling
I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Hi,
I need to write a Shell Script wherein i will connect to a DB2 Database and run multiple DB procedures. I know how to do in a way where procedures will be called one after the other, like when first procedure finishes, second will be executed.
But what i want is to run them at the same time... (11 Replies)
i Run 2 scripts on all of around 50 nodes every day.
1.Mod_1.sh
2.Mod_2.sh
eg..
i run file with specific node no like
Mod_1.sh NODE_(node number)
Mod_2.sh NODE_(node number)
I want to run both file by using single script with unique node number.
Eg..
Mod_new.sh NODE_(node... (11 Replies)
I have to run some shell scripts in Windows using Cygwin. I am able to achieve that using
%BASH% --login -i "/cygdrive/d/script.sh"
, where %BASH% is an environment variable in Windows set to
C:\cygwin\bin\bash.exe.
I have a created a Cygwin environment variable $EXE_PATH =... (3 Replies)
I have N number of python scripts which i am receiving from REST web server and i am saving them in /home/mandar/ . Now i want to write a script to run all the python scripts from this directory and monitor them every minute...if any process is dead or hung it should be restarted by this script.
... (0 Replies)
Scenario:
I have two PCs (named as A & B) which would send some traps to my third PC (named as C).
In PC C, I have to write a shell script such that it should accept the datas from both the PC-A & B parallely.
So my question is, is it possible to have two different child threads/tasks... (2 Replies)
Hi!
I want to run a script in parallel with different arguments.
eg.
start
script.sh argA script.sh argB script.sh argC
end
Can someone please tell how to achieve this.
Thanks in advance. (4 Replies)
How do I create a K Shell which would silently (without user input) logon to Oracle and
run an SQL script?
Any help will be greatly appreciated.
Steve (1 Reply)
Hi ,
I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell.
So scenario is that
- I need to have one shell script which is ran as a part of crontab
- in this shell script I need to do a... (2 Replies)