管道命令和xargs的区别
来源:互联网 发布:wlan未识别的网络win10 编辑:程序博客网 时间:2024/04/29 23:27
- 管道命令和xargs的区别
- 效果展示
管道命令和xargs的区别
- 管道命令,是把管道前面命令的输出结果,作为管道后面命令的“输入”。
个人理解,就当是把管道前面命令的输出结果,加上双引号,以字符串的形式,传递给管道后面命令。
如下命令,最终执行的是cat "--help"
。
echo "--help" | cat
- xargs, 是把管道前面命令的输出结果,作为管道后面命令的“参数”。
如下命令,最终执行的是cat --help
。
echo "--help" | xargs cat
效果展示
qilei@AFAAW-704030720:~$ echo "--help" | cat--helpqilei@AFAAW-704030720:~$ echo "--help" | xargs catUsage: cat [OPTION]... [FILE]...Concatenate FILE(s), or standard input, to standard output. -A, --show-all equivalent to -vET -b, --number-nonblank number nonempty output lines, overrides -n -e equivalent to -vE -E, --show-ends display $ at end of each line -n, --number number all output lines -s, --squeeze-blank suppress repeated empty output lines -t equivalent to -vT -T, --show-tabs display TAB characters as ^I -u (ignored) -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB --help display this help and exit --version output version information and exitWith no FILE, or when FILE is -, read standard input.Examples: cat f - g Output f's contents, then standard input, then g's contents. cat Copy standard input to standard output.Report cat bugs to bug-coreutils@gnu.orgGNU coreutils home page: <http://www.gnu.org/software/coreutils/>General help using GNU software: <http://www.gnu.org/gethelp/>For complete documentation, run: info coreutils 'cat invocation'qilei@AFAAW-704030720:~$
0 0
- 管道命令"|"和"xargs"命令的区别
- 管道命令和xargs的区别
- 管道命令和xargs的区别
- 管道命令和xargs的区别
- 管道命令和xargs的区别
- xargs和管道的区别
- 管道命令和xargs的区别(经典解释)
- 管道命令和xargs的区别(经典解释)
- 管道命令和xargs的区别(经典解释)
- 管道命令和xargs的区别(经典解释)
- linux中xargs和管道命令的区别
- 管道命令和xargs的区别(经典解释)
- 管道命令和xargs的区别(经典解释)
- 管道命令和xargs的区别(经典解释)
- 管道命令和xargs的区别(经典解释)
- xargs命令详解,xargs与管道的区别
- xargs命令详解,xargs与管道的区别
- xargs命令详解,xargs与管道的区别
- P1980 计数问题
- Symmetric Tree
- 总结16 畅想17
- Android So动态调试之反jdb附加的解决大法
- 开源项目
- 管道命令和xargs的区别
- 如何录制屏幕为gif动图文件
- Android项目仿驾校宝典的答题APP
- QStringList类使用总结
- 浏览器的重排与重绘
- vmware下 ubuntu 16.04.1 设置静态ip地址
- C. Pavel and barbecue
- 2003 64位 方法运行asp ,连接数据库出现错误设置方法
- [Leetcode] 3. Longest Substring Without Repeating Characters