I have a process
"verifyEmail"
I run this in script as verifyEmail 0 1000
Now How do I wait until this process is finished executing before moving on to next instruction in shell script ? It takes more than 60 mins for verifyEmail to run
I tried
while ! checkprocess "verifyEmail"; do ##Checkprocess is a function which returns 0 or 1
sleep 60 ## based on process present or not
done
If you run the process normally, you don't need to do anything. If you run it asynchronously, you just need to wait for it:
verifyEmail 0 1000
echo This will print after verifyEmail is done!
or
verifyEmail 0 1000 &
wait $!
echo This will print after verifyEmail is done!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With