xargs with multiple arguments

后端 未结 12 1749
独厮守ぢ
独厮守ぢ 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:44

    It's because echo prints a newline. Try something like

    echo my-program `xargs --arg-file input.txt -i echo -n " --file "{}`
    

提交回复
热议问题