linux - How can I loop through similar files and then choose another file that corresponds to the file chosen during the loop? -


for shell script how can loop through similar files , while i'm looping through these files choose file corresponds 1 chosen loop @ time?

here of code:

files=(/home/practice/sm_data.*.model)  f in "${files[@]}"          infile1="${files[@]}"         infile2= (/home/practice/sm_data.*.source) done 

so, first time goes through loop want choose sm_data.1.model (which here) based on want find sm_data.1.source.

any appreciated!


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -