几个常用的xargs使用例子
来源:互联网 发布:web数据挖掘 pdf 编辑:程序博客网 时间:2024/05/16 00:50
xargs是一个非常有用的命令。下面给出我常用的几个例子:
假设有文件 f 内容如下:
abc123456789qwertyop
test命令把命令行输入原样输出,源码如下:
#include <stdio.h>int main(int argc, char **argv){ for(int i=0; i<argc; ++i) printf("%s ", argv[i]); printf("\n"); return 0;}
cat f|xargs ./test输出:./test abc 123 456 789 qwe rty op cat f|xargs -n 1 ./test输出:./test abc ./test 123 ./test 456 ./test 789 ./test qwe ./test rty ./test op cat f|xargs -n 1 ./test xxx输出:./test xxx abc ./test xxx 123 ./test xxx 456 ./test xxx 789 ./test xxx qwe ./test xxx rty ./test xxx op cat f|xargs -I aaa -n 1 ./test aaa xxx输出:./test abc xxx ./test 123 xxx ./test 456 xxx ./test 789 xxx ./test qwe xxx ./test rty xxx ./test op xxx cat f|xargs -i -n 1 ./test {} xxx 输出:./test abc xxx ./test 123 xxx ./test 456 xxx ./test 789 xxx ./test qwe xxx ./test rty xxx ./test op xxx
- 几个常用的xargs使用例子
- 使用crontab的几个例子.
- ViewPager使用的几个例子
- 总结的几个常用的sql例子
- android之Uri的常用几个例子
- android之Uri的常用几个例子
- android之Uri的常用几个例子
- android之Uri的常用几个例子
- android之Uri的常用几个例子
- android之Uri的常用几个例子
- android之Uri的常用几个例子
- cv2的几个常用函数及例子
- JSP C标签的几个常用例子。
- Xargs 的使用
- xargs 的使用
- xargs的简单使用
- xargs的使用
- xargs的使用
- 20120928
- oracle OS Watcher 安装与错误处理
- hbase 表的重命名
- 主题:用Eclipse进行远程Debug代码
- 我们爱面试,一面一学-----微软谷歌面试100题--【54】调整数组顺序使奇数位于偶数前面
- 几个常用的xargs使用例子
- 插件安装
- EXCEL快捷键大全
- Hibernate 集合属性的延迟加载
- 程序员,请昂起你高贵的头!
- zoj 3353 Chess Board 高斯消元
- 如何给 eclipse 设置快捷键
- android模拟器的快捷键
- DNW下USB驱动故障的解决