免费注册 查看新帖 |

Chinaunix

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

[其他] sed r的疑问 [复制链接]

论坛徽章:
26
CU大牛徽章
日期:2013-03-13 15:15:08水瓶座
日期:2014-08-31 19:44:01卯兔
日期:2014-09-05 08:48:33摩羯座
日期:2014-09-07 13:03:35子鼠
日期:2014-09-10 08:42:36白羊座
日期:2014-09-20 12:39:07丑牛
日期:2014-09-24 07:35:252015年亚洲杯之阿联酋
日期:2015-02-03 17:42:542015年亚洲杯之卡塔尔
日期:2015-02-11 13:13:022015年亚洲杯之约旦
日期:2015-03-03 15:10:522015年辞旧岁徽章
日期:2015-03-03 16:54:152015年亚洲杯之卡塔尔
日期:2015-03-27 14:08:09
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-08-13 15:41 |只看该作者 |倒序浏览
info sed 看到的,gnu的扩展 accepts two addresses.是什么意思,谁给个例子?
[code]
`r FILENAME'
     As a GNU extension, this command accepts two addresses.

     Queue the contents of FILENAME to be read and inserted into the
     output stream at the end of the current cycle, or when the next
     input line is read.  Note that if FILENAME cannot be read, it is
     treated as if it were an empty file, without any error indication.

     As a GNU `sed' extension, the special value `/dev/stdin' is
     supported for the file name, which reads the contents of the
     standard input.

[code]
还有 sed&awk似乎有错哦,我正在看的是第二版的饭醉团伙修订版,说r是将文件的内容读入模式空间,按文档应该是输出到输出流吧?

r.png (33.52 KB, 下载次数: 26)

sed&awk原文

sed&awk原文

论坛徽章:
2
射手座
日期:2014-10-10 15:59:4715-16赛季CBA联赛之上海
日期:2016-03-03 10:27:14
2 [报告]
发表于 2013-08-13 17:23 |只看该作者
回复 1# Third-Edition


    sed '/address1/,/address2/r FILENAME' file
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP