How can I pass all arguments with xargs in middle of command in linux

前端 未结 8 2090
一个人的身影
一个人的身影 2020-12-09 08:37

I want to pass all the files as a single argument on Linux but I am not able to do that.

This is working

ls | sort -n | xargs  -i pdftk  {} cat outpu         


        
8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 09:10

    Use -I option:

    echo prefix | xargs -I % echo % post
    

    Output:

    prefix post
    

提交回复
热议问题