xargs 和 | (管道)命令的区别

| 管道命令:将 | 前面的输出作为 | 后面的输入。如:

命令行下输入:echo "--help" |cat

输出:--help

xargs 命令:将 | 前面的输出,作为 xargs 后面命令 的参数。如:

命令行下输入:echo "--help" |xargs cat 

等同于执行:cat --help


猜你喜欢

转载自blog.csdn.net/qq125293177/article/details/80579281