How can I fork two programs to the background using one line of bash and possibly an ampersand?
background-process, bash
Solution
You leave out the ';' char, i.e.
program1 & program2 &
I hope this helps.
Problem
I have two programs that run indefinitely. I know I can fork one to the background then run the other by typing this at the command line: ``` > program1 & > program2 & ``` However, I'm lazy and don't want to hit enter, I just want to run them both immediately. But bash complains when I do this: ``` > program1 &; program2 & ``` How can I run them both at the same time?