Like you executed, it will start all the processes in paralell, putting them in the background. That's what the ampersand (&
) does.
In that case, run the commands in sequence, i. e., one after the other.
To do that, separate each process with a semicolon (;
) or in new lines, without the final ampersand, like this:
process1; process2; ... ; process30
or
process1
...
process30
Like this, it will start process1, and when it ends will start process2, and when process2 ends, it will start process3, and so on, until process30.
If you only want to run the next command if the current one doesn't fail, then separate the commands with two ampersands (&&
), like this:
process1 && process2 && ... && process30