how to launch two shell scripts at once
I want to launch two shell scripts at once. The first is a korn shell script, the second a bash script. Originally I considered adding the bash script as a line in the korn script but then it occurred to me that the korn script would wait until the bash script is done before moving on to the next line. The idea is that I want the bash script to take snapshots of what's happening during the first 90 seconds of the korn script.
Would this work?: me@mysles8server> ./mykornscript & ; ./mybashscript If I read that right it runs the korn script in bg and the bash script in foreground. Maybe I wouldn't have to use the '&' symbol and just type them both separated by the semicolon -- ./mykornscript;./mybashscript Maybe I can drop that line separated by a semicolon into a script of its own to keep things easy. Hmmm......I'll test this in a few hours when I get to work and report for any other n00bs like me who may find it useful. |
Separating commands with a semi-colon is just like pressing return, so this:
Code:
command1 ; command2 If you want to run command1 and command2 in parallel, you can do it with the &, but you don't need the semi-colon: Code:
command1 & command2 You could put them both in the background like this: Code:
command1 & command2 & Code:
command1 & command2 & wait Enjoy |
All times are GMT -5. The time now is 08:24 AM. |