I am trying to run two shell scripts at once only in one script to kick it off on linux.
For example, below is what I do in my kick off script, which is called (startupdatedb.sh).
#!/bin/ksh
ssh userdb@app3 'cd /scripts/oss/ && ./updatedb.sh'
ssh userdb@app1 'cd /scripts/oss/ && ./updatedb.sh'
I want both updatedb.sh scripts on my 2 different servers (app1 and app3 to run at the same time. Right now, it will run the script on app3 first, I have to wait and then it will run the script on app1 and then it completes. I want to be able to have it run both updatedb.sh scripts at the same time. This is not a scheduled cron script either. It will be manually kicked off. I'm kind of lost on how to accomplish this or if there is a way.
Any help would be appreciated. Thanks!
For example, below is what I do in my kick off script, which is called (startupdatedb.sh).
#!/bin/ksh
ssh userdb@app3 'cd /scripts/oss/ && ./updatedb.sh'
ssh userdb@app1 'cd /scripts/oss/ && ./updatedb.sh'
I want both updatedb.sh scripts on my 2 different servers (app1 and app3 to run at the same time. Right now, it will run the script on app3 first, I have to wait and then it will run the script on app1 and then it completes. I want to be able to have it run both updatedb.sh scripts at the same time. This is not a scheduled cron script either. It will be manually kicked off. I'm kind of lost on how to accomplish this or if there is a way.
Any help would be appreciated. Thanks!