Hi,
I have a program that has 4 individual lines of code that are searching through multiple files. I'd like to speed the program up by running those 4 lines simultaneously with Parallel. How would I structure my bash code to achieve this?
Eg:
<command>| parallel <command> | parallel <command> >> file
<command>| parallel <command> | parallel <command> >> file
<command> | parallel <command> >> file
<command> | parallel <command> >> file
I'm thinking something like this:
<command>| parallel <command> | parallel <command> >> file; parallel <command>| parallel <command> | parallel <command> >> file; parallel <command> | parallel <command> >> parallel file; <command> | parallel <command> >> file
Basically, I'm trying to achieve the effect where instead of waiting for each line of code to complete before the next one runs, have each line of code run at the same time and complete roughly at the same time on multiple cores.
Thanks!