i unable execute 2 scripts in parallel through shell script.
i have 3 scripts: script1.sh, script2.sh , installpackages.sh.
my requirement script1.sh , script2.sh have run in parallel in background , after completion of script1.sh , script2.sh, installpackages.sh should executed.
selid1t601.xayybol.74> vi script.sh exec script1.sh & exec script2.sh & installpackages.sh
can please suggest how can execute script1.sh , script2.sh in parallel?
since executing scripts in background running in parallel. thing need wait
ensure scripts have been executed before proceeding final step. need say:
exec script1.sh & exec script2.sh & wait installpackages.sh
from manual:
wait
wait [jobspec or pid ...]
wait until child process specified each process id pid or job specification jobspec exits , return exit status of last command waited for. if job spec given, processes in job waited for. if no arguments given, active child processes waited for, , return status zero. if neither jobspec nor pid specifies active child process of shell, return status 127.
Comments
Post a Comment