免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1841 | 回复: 3
打印 上一主题 下一主题

[网络相关] xargs表示什么意思? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-06-04 14:50 |只看该作者 |倒序浏览

GOOGLE上的解释如下

-I 表示 find 传递给xargs的结果 由{}来代替

netstat -Ana|grep 1521|awk '{print $1}'|sort|uniq|xargs -I {}



不知道这个有什么用

论坛徽章:
16
IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每月发帖之星
日期:2015-09-11 19:30:52IT运维版块每周发帖之星
日期:2015-09-11 19:20:31IT运维版块每日发帖之星
日期:2015-08-26 06:20:00每日论坛发贴之星
日期:2015-08-20 06:20:00IT运维版块每日发帖之星
日期:2015-08-20 06:20:002015年辞旧岁徽章
日期:2015-03-03 16:54:15金牛座
日期:2014-05-04 16:58:09双子座
日期:2013-12-17 16:44:37辰龙
日期:2013-11-22 15:20:59狮子座
日期:2013-11-18 22:55:08射手座
日期:2013-11-12 10:54:26
2 [报告]
发表于 2013-06-04 15:03 |只看该作者
NAME
       xargs - build and execute command lines from standard input

SYNOPSIS
       xargs  [-0prtx] [-E eof-str] [-e[eof-str]] [--eof[=eof-str]] [--null] [-d delimiter] [--delimiter delimiter] [-I replace-str] [-i[replace-str]]
       [--replace[=replace-str]]  [-l[max-lines]]  [-L  max-lines]  [--max-lines[=max-lines]]  [-n  max-args]  [--max-args=max-args]  [-s   max-chars]
       [--max-chars=max-chars]  [-P  max-procs]  [--max-procs=max-procs]  [--interactive]  [--verbose]  [--exit] [--no-run-if-empty] [--arg-file=file]
       [--version] [--help] [command [initial-arguments]]

DESCRIPTION
       This manual page documents the GNU version of xargs.  xargs reads items from the standard input, delimited by blanks (which  can  be  protected
       with  double  or single quotes or a backslash) or newlines, and executes the command (default is /bin/echo) one or more times with any initial-
       arguments followed by items read from standard input.  Blank lines on the standard input are ignored.

       Because Unix filenames can contain blanks and newlines, this default behaviour is often problematic; filenames containing  blanks  and/or  new-
       lines  are incorrectly processed by xargs.  In these situations it is better to use the '-0' option, which prevents such problems.   When using
       this option you will need to ensure that the program which produces the input for xargs also uses a null character as  a  separator.   If  that
       program is GNU find for example, the '-print0' option does this for you.

       If  any  invocation of the command exits with a status of 255, xargs will stop immediately without reading any further input.  An error message
       is issued on stderr when this happens.

论坛徽章:
33
ChinaUnix元老
日期:2015-02-02 08:55:39CU十四周年纪念徽章
日期:2019-08-20 08:30:3720周年集字徽章-周	
日期:2020-10-28 14:13:3020周年集字徽章-20	
日期:2020-10-28 14:04:3019周年集字徽章-CU
日期:2019-09-08 23:26:2519周年集字徽章-19
日期:2019-08-27 13:31:262016科比退役纪念章
日期:2022-04-24 14:33:24
3 [报告]
发表于 2013-06-04 15:46 |只看该作者

论坛徽章:
5
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:50:282015年亚洲杯之朝鲜
日期:2015-03-13 22:47:33IT运维版块每日发帖之星
日期:2016-01-09 06:20:00IT运维版块每周发帖之星
日期:2016-03-07 16:27:44
4 [报告]
发表于 2013-06-05 09:05 |只看该作者
就 X arguments 的意思,挺形象的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP