xargs with multiple arguments

后端 未结 12 1768
独厮守ぢ
独厮守ぢ 2020-12-13 08:05

I have a source input, input.txt

a.txt
b.txt
c.txt

I want to feed these input into a program as the following:

<         


        
12条回答
  •  佛祖请我去吃肉
    2020-12-13 08:39

    dont listen to all of them :) just look at this example:

    echo argument1 argument2 argument3 | xargs -l bash -c 'echo this is first:$0 second:$1 third:$2' | xargs
    

    output will be

    this is first:argument1 second:argument2 third:argument3
    

提交回复
热议问题