When to use xargs when piping?

后端 未结 5 558
挽巷
挽巷 2021-02-07 10:59

I am new to bash and I am trying to understand the use of xargs, which is still not clear for me. For example:

history | grep ls

H

5条回答
  •  旧时难觅i
    2021-02-07 11:40

    GNU Parallel can do the same as xargs, but does not have the broken and exploitable "features".

    You can learn GNU Parallel by looking at examples http://www.gnu.org/software/parallel/man.html#EXAMPLE:-Working-as-xargs--n1.-Argument-appending and walking through the tutorial http://www.gnu.org/software/parallel/parallel_tutorial.html

提交回复
热议问题