当前位置:网站首页>The role of xargs

The role of xargs

2022-06-26 01:52:00 Look back in vain

Again linux We often see script There will be xargs Of command , So what is the difference between this command and the pipeline . Let's discuss this usage

 

for example : echo '--help' | cat    The output is --help 

            echo '--help' | xargs cat The output is cat The help order of

 

How does this explain commonly linux There are two main types of input consciousness Parameter input , The second is standard input This class contains The Conduit So when the following statement is output

    echo '--help' | cat test.txt    He output test.txt The content of instead of '--help' Should be general Will take the parameter input as the first input . 

原网站

版权声明
本文为[Look back in vain]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206260004248377.html