Programmatically start a series of processes w\ job control

173 Views Asked by At

I have a series of 7 processes required to run a complex web app that I develop on. I typically start these processes manually like this:

job &>/tmp/term.tail &

term.tail is a fifo pipe I leave tail running on to see the output of these processes when I need to.

I'd like to find away to start up all the processes within my current shell, but a typical script (shell or ruby) runs w\in it's own shell. Are there any work arounds?

I'm using zsh in iTerm2 on OSX.

1

There are 1 best solutions below

1
On BEST ANSWER

You can run commands in the current shell with:

source scriptfile

or

. scriptfile

A side note, your processes will block if they generate much output and there isn't something reading from the pipe (i.e. if the tail dies).