Splitting command line args with GNU parallel

后端 未结 3 958
一个人的身影
一个人的身影 2021-02-02 06:37

Using GNU parallel: http://www.gnu.org/software/parallel/

I have a program that takes two arguments, e.g.

$ ./prog file1 file2
$ ./prog file         


        
3条回答
  •  Happy的楠姐
    2021-02-02 07:16

    You are probably looking for --colsep.

    generate_file_pairs | parallel --colsep ' ' ./prog {1} {2}  
    

    Read man parallel for more. And watch the intro video if you have not already done so http://www.youtube.com/watch?v=OpaiGYxkSuQ

提交回复
热议问题