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

symfony - InvalidConfigurationException in SecurityExtension.php line 429: No authentication listener registered for firewall "secured_area" -

angular ui router - 10 digest iterations reached in angularjs when using $state.go -

javascript - Handling constructor related functions while testing with mocha and sinon -