I have a simple text file (command_script.txt) that I am executing as a bash script.
The content of command_script.txt is something like this:
#!/bin/bash
some_command -flags input1 output1
some_command -flags input2 output2
some_command -flags input3 output3
...
some_command -flags input1000 output1000
I execute it on the command line (./command_script.txt) and it runs through one line at a time. Is there an easy way I can run 20 lines at a time in parallel?
Thanks!
By appending "&" at the end of a line a process is launched in background. Hence, the next one is started immediately such that both are running in parallel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With