I have a list of files in ids1. Example
s1_aaa
s1_aab
s1_aac
I want to submit jobs for these files using sbatch: I use
for x in `cat ids1`;do sbatch batch_job.sbatch $x ;done
This works fine.
Now I try for 2 variables in the for loop. Example I have another file ids2 like
s2_aaa
s2_aab
s2_aac
I want to submit jobs for files in ids1
and ids2
simultaneously i.e. pairs (s1_aaa,s2_aaa), (s1_aab,s2_aab), (s1_aac,s2_aac) and so on. When I try
for x,y in `cat ids1;cat ids2`;do sbatch batchjob.sbatch $x $y ;done
I get the error
-bash: `x,y': not a valid identifier
What am I doing wrong?