1. Summary
I don't understand, how I can combine parallel and sequential commands in Linux.
2. Expected behavior
Pseudocode:
pip install pipenv
sequential pipenv install --dev
parallel task
npm install -g grunt-cli
sequential npm install
Windows batch working equivalent:
start cmd /C "pip install pipenv & pipenv install --dev"
start cmd /C "npm install -g grunt-cli & npm install"
3. Not helped
- I don't think, that
&
andwait
can solve this problem, see rsaw comment. - I read, that GNU parallel — is better way for parallel tasks, but I can't find, which syntax I need to use in GNU parallel, that solve this task.
-
I try parallelshell:
parallelshell "pip install pipenv && pipenv install --dev" "npm install -g grunt-cli && npm install"
Full
.sh
file:git clone --depth 1 https://github.com/Kristinita/KristinitaPelican wait cd KristinitaPelican wait parallelshell "pip install pipenv && pipenv install --dev" "npm install -g grunt-cli && npm install"
But at first
pipenv install --dev
command run for me, thennpm install
. It sequential, not parallel.
Best Answer
Simply with GNU
parallel
: