bash shell script two variables in for loop

前端 未结 7 1195
终归单人心
终归单人心 2020-12-09 19:33

I am new to shell scripting. so kindly bear with me if my doubt is too silly.

I have png images in 2 different directories and an executable which takes an images f

7条回答
  •  难免孤独
    2020-12-09 20:23

    Another solution. The two lists with filenames are pasted into one.

    paste <(ls --quote-name ~/prev1/*.png) <(ls --quote-name ~/prev3/*.png) | \
    while read args ; do
      run_black $args
    done  
    

提交回复
热议问题