Sequential and parallel execution of long-running shell commands