I need to run a command for each individual instance of a given variable name in parallel. Sometimes, there might be 4 variables, other times there might be 100. For example, say I have this particular dataset as:
datanames='KQPW KMMX KMKO KZAO'
I need to run a process for each which is to be run in parallel with one-another. In other words, I need to run process1 for KQPW while running process1 for KMMX while ... etc. Process1 requires input based on the variablename.
From the tutorials I have read, and some initial digging, I have installed the GNU 'parallel' command. I have put all of the datanames into a textfile called "run.txt":
KQPW.csh KMMX.csh KMKO.csh KZAO.csh
wherein each of the
.csh files contains the command for calling process1 with the unique variable name as the necessary input to process1. The question is, how do I run all four of these commands at once? I tried:
cat run.txt | parallel
but nothing happened. Any thoughts?