Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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

mongod &
share|improve this answer
    
Worked perfectly :) –  Andrew M Dec 17 '11 at 22:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.