1

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.

Andy
  • 4,789
  • 23
  • 20
  • I find the problem unclear. Starting a series of processes in bash with the `&` operator at the end of each line will allow all processes to start. Is something undesirable happening after they all start? – Andrew E. Falcon Apr 15 '11 at 19:02
  • Sorry, the problem was when executing the a shell script it was running with the commands in a new interpreter, not my current context. When the script was over, it would close it's interpreter and kill the jobs. @Andy's answer of using source works. – TJ Singleton Apr 15 '11 at 21:13

1 Answers1

1

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

Andy
  • 4,789
  • 23
  • 20