
sed与awk
Sed & awk
Dale Dougherty、Arnold Robbins · 初版 1990 年
3人推荐
6位读者提及
7次提及
<i>sed & awk</i> 介绍了作为 UNIX 程序员工具箱中坚力量的两款文本处理程序。<i>sed</i> 是一种“流编辑器”,用于编辑可能因体积过大而无法作为单个文件编辑的文本流,或者作为更大数据处理流程的一部分而实时生成的文本流。使用 <i>sed</i> 最常见的操作是替换,即将一段文本替换为另一段文本。<i>awk</i> 是一种完整的编程语言。与许多传统语言不同,<i>awk</i> 是“数据驱动”的——你只需指定感兴趣的数据类型以及要执行的操作
Hacker News 上怎么说
正在加载完整评论……
老规矩,把关于它的每本书都读一遍![0] 千万别试图通过看 man page 来学。我觉得 A、W 和 K 写的那本原著(至少是第2版)是最好的。另外 Arnold Robbins 的书《Sed and Awk》和《Effective AWK Programming》也很棒。GNU Awk 用户指南 [1] 详尽得惊人,不过新版 AWK 臃肿了不少,以前只有几十个特性的地方现在塞进去了 1000 个特性,而那些核心特性……
Same as usual, read every book about it![0] and don't try to learn from the man page. I think the original book by A, W and K (the 2nd edition anyway) was best. Also Arnold Robbins' books Sed and Awk and Effective AWK Programming are great. The GNU Awk User's Guide[1] is amazingly detailed, but the new AWK has bloated a lot, has 1000 features where the older one had a few dozen, and those core ones…
这里有一份:http://gen.lib.rus.ec/book/index.php?md5=0AD0779BF3602F1EA22... 另外 Arnold Robbins 的书《Sed and Awk》和《Effective Awk Programming》也极其出色,还详细介绍了自《The AWK Programming Language》(1988)最新版以来新增的诸多特性。http://gen.lib.rus.ec/search.php?&req=awk+robbins&sort=year&...
A copy: http://gen.lib.rus.ec/book/index.php?md5=0AD0779BF3602F1EA22... Also Arnold Robbins' books Sed and Awk and Effective Awk Programming are excellent, and also detail the many features added since the latest edition of The AWK Programming Language (1988). http://gen.lib.rus.ec/search.php?&req=awk+robbins&sort=year&...
O'Reilly 出的那本《Sed & Awk》也很有意思。 http://shop.oreilly.com/product/9781565922259.do
The O'Reilly Sed & Awk book is a lot of fun, too. http://shop.oreilly.com/product/9781565922259.do
O'Reilly 出版的《UNIX Power Tools》是我在这方面极力推荐的一本书。它有点像纸质版的超文本叙事,穿梭在各种命令行和终端工具之间。 虽然其中有些内容现在已经过时了(天哪……距离第一版已经过去 22 年了),但由于它是基于 UNIX 哲学的书籍之一,经受住了时间的考验,依旧很有价值。 它、加上《Linux in a Nutshell》和那本《Sed & AWK》,依旧是相当
UNIX Power Tools by O'Reilly is a text I strongly recommend for this. It's a sort of hardcopy hypertext narrative through a number of command-line and terminal-focused tools. Parts of it are dated now (it's ... gasp, 22 years since its first edition), but since it's one of those books based on UNIX philosophy it's aged quite well. It, Linux in a Nutshell, the Sed & AWK book, are still a pretty
我现在手头同时在看好几本书: 1. Computer Networking: A Top-Down Approach 第6版。 2. TCP/IP Illustrated, Vol. 1 第2版。 3. Interconnections: Bridges, Routers, Switches, and Internetworking Protocols 第2版。 4. Engineering a Compiler 第2版。 5. Flex & Bison。 6. Sed & Awk。 7. K & R。 8. The Unix Programming Environment。 9. Advanced Programming in the UNIX Environment。 10.
I'm juggling several books currently: 1. Computer Networking: A Top-Down Approach 6th Edition. 2. TCP/IP Illustrated, Vol. 1 2nd Edition. 3. Interconnections: Bridges, Routers, Switches, and Internetworking Protocols 2nd Edition. 4. Engineering a Compiler 2nd Edition. 5. Flex & Bison. 6. Sed & Awk. 7. K & R. 8. The Unix Programming Environment. 9. Advanced Programming in the UNIX Environment. 10.
我最早接触 roff 及其排版体系,是通过 Dale Dougherty 和 Arnold Robbins 在 1997 年出版的《Sed & Awk》。书中很多例子都是为了自动插入/修正 roff 宏。具体例子我记不清了,但大概是“匹配到 `/^CHAPTER/` 时插入 roff 的 'section' 宏”之类的。 说到底,这可能并不太实用
My introduction to roff and co. as a typesetting system was the 1997 edition of Dale Dougherty and Arnold Robbins's Sed & Awk. Many of the book's examples are geared toward automatically inserting/correcting roff macros. I can't recall a specific example from the book, but it would be something like "insert the roff 'section' macro on matches of `/^CHAPTER/`." Ultimately, it's probably not practi