How to run multiple commands in parallel
Problem:
I want to run multi commands simultaneously in zsh.
I need to create multi cluster with eksctl at the same time.
Because running them sequentially is inefficient and takes a long time.
Solution:
eksctl create cluster -f host.yaml & eksctl create cluster -f cluster1.yaml & eksctl create cluster -f cluster2.yaml && fg
Source:
How do you run multiple programs in parallel from a bash script?
I am trying to write a .sh file that runs many programs simultaneously I tried this prog1 prog2 But that runs prog1 then waits until prog1 ends and then starts prog2... So how can I run them in
stackoverflow.com
https://www.ibm.com/docs/en/aix/7.2?topic=f-fg-command
fg Command
Purpose Runs jobs in the foreground. Syntax fg [JobID] Description If job control is enabled, the fg command moves a background job in the current environment into the foreground. Use the JobID parameter to indicate a specific job to be run in the foregrou
www.ibm.com