1

I have a bunch of scripts that I need to run to start up a couple Node.js scripts and Mongo, among a couple other things. I'd like to create an SH script that I could run to start ALL of these at once. The problem is, each of these will not return until they crash or I quit them... I think this would prevent the script from advancing to launch the rest of the programs I want to run.

For example:

node script.js
mongod
./anotherscript.sh

How would I get an SH script to start ALL of these, even if mongod won't return until it crashes?

1 Answer 1

4

Use the amperstand. This will launch the command returning the control.

mongod &
1
  • Worked perfectly :)
    – Andrew M
    Dec 17, 2011 at 22:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .