I know I can run a program in the background using
However, I want to run multiple commands, and
cd into a different directory while they are running.
The multiple commands will still rely on the directory I was previously in.
I've tried the following, but it only runs the last command in the background:
command1 && command2 &
Doing this gives a parse error:
command1 & && command2 &
It's important that
command1 finishes before
so I don't think the following would guarantee that:
command1 &; command2 &;
I'm not tied to any specific shell.