Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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
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

You must log in to answer this question.

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