I'd like to be able to provide a long list of arbitrary/different commands (varying binary/executable and arguments) and have xargs run those commands in parallel (xargs -P).
I can use xargs -P fine when only varying arguments. It's when I want to vary the executable and arguments that I'm having difficulty.
Example: command-list.txt
% cat command-list.txt binary_1 arg_A arg_B arg_C binary_2 arg_D arg_E .... <lines deleted for brevity> binary_100 arg_AAA arg_BBB % xargs -a command-list.txt -P 4 -L 1 ** I know the above command will only echo my command-list.txt ** I am aware of GNU parallel but can only use xargs for now. I also can't just background all the commands since there could be too many for the host to handle at once.
Solution is probably staring me in the face. Thanks in advance!