- 出版社: O'Reilly Media; 2 (1997年3月1日)
- 丛书名: Nutshell Handbooks
- 平装: 432页
- 语种： 英语
- ISBN: 1565922255
- 条形码: 9781565922259
- 商品尺寸: 17.8 x 2.5 x 23.3 cm
- 商品重量: 680 g
- ASIN: 1565922255
- 用户评分: 分享我的评价
- 第21位 - 图书 > 进口原版书 > Computers & Technology（计算机与科技） > Operating Systems（操作系统） > Unix
- 第32位 - 图书 > 进口原版书 > Computers & Technology（计算机与科技） > Operating Systems（操作系统） > Linux
- 第97位 - 图书 > 进口原版书 > Computers & Technology（计算机与科技） > Programming（编程） > Software Design, Testing & Engineering > Software Development
sed & awk (英语) 平装 – 1997年3月1日
sed & awk, one of the most popular books in O'Reilly & Associates' Nutshell series, describes two text processing programs that are mainstays of the UNIX programmer's toolbox. sed is a "stream editor" for editing streams of text that might be too large to edit as a single file, or that might be generated on the fly as part of a larger data processing step. The most common operation done with sed is substitution, replacing one block of text with another. awk is a complete programming language. Unlike many conventional languages, awk is "data driven" -- you specify what kind of data you are interested in and the operations to be performed when that data is found. awk does many things for you, including automatically opening and closing data files, reading records, breaking the records up into fields, and counting the records. While awk provides the features of most conventional programming languages, it also includes some unconventional features, such as extended regular expression matching and associative arrays. sed & awk describes both programs in detail and includes a chapter of example sed and awk scripts. This new edition covers features of sed and awk that are now mandated by the POSIX standard. This most notably affects awk, where POSIX standardized a new variable, CONVFMT, and new functions, toupper() and tolower(). The CONVFMT variable specifies the conversion format to use when converting numbers to strings (awk used to use OFMT for this purpose). The toupper() and tolower() functions each take a (presumably mixed case) string argument and return a new version of the string with all letters translated to the corresponding case. In addition, this edition covers GNU sed, newly available since the first edition. It also updates the first edition coverage of Bell Labs nawk and GNU awk (gawk), covers mawk, an additional freely available implementation of awk, and briefly discusses three commercial versions of awk, MKS awk, Thompson Automation awk (tawk), and Videosoft (VSAwk).
From the Back Cover
Dale Dougherty is the publisher of the O'Reilly Network and Director of O'Reilly Research. Dale has been instrumental in many of O'Reilly's most important efforts, including founding O'Reilly & Associates with Tim O'Reilly. He was the developer and publisher of Global Network Navigator (GNN), the first commercial Web site. Dale was developer and publisher of Web Review, the online magazine for Web designers, and he was O'Reilly & Associates' first editor. Dale has written and edited numerous books at O'Reilly & Associates. Dougherty is a Lecturer in the School of Information Management and Systems (SIMS) at the University of California at Berkeley.
Arnold Robbins, an Atlanta native, is a professional programmer and technical author. He has worked with Unix systems since 1980, when he was introduced to a PDP-11 running a version of Sixth Edition Unix. He has been a heavy AWK user since 1987, when he became involved with gawk, the GNU project's version of AWK. As a member of the POSIX 1003.2 balloting group, he helped shape the POSIX standard for AWK. He is currently the maintainer of gawk and its documentation. He is also coauthor of the sixth edition of O'Reilly's Learning the vi Editor. Since late 1997, he and his family have been living happily in Israel.
此商品在美国亚马逊上最有用的商品评论 (beta) (可能包括"Early Reviewer Rewards Program"的评论)
SED and AWK are these two very terse programs that, if you don't use them everyday, you tend to forget their syntax and functionality. I am not an everyday user. Before I bought this book, I often visited one of my many SED/AWK bookmarks. After years of using both programs, I never really understood them. I knew just enough to do small one-liners. However, I recently needed to build a fairly complex script to perform an automated OS upgrade via the network. I knew SED and AWK could help me accomplish my task, but I didn't have a full understanding of their potential. That's when I decided to buy this book. I have since then deleted all of my SED and AWK bookmarks.
After studying this book and highlighting the hell out of it, I have a clear understanding of these two tools and how to effectively utilize them.
Dated material aside, I found the book difficult to use, even though I've been learning programming languages since 1982 -- including that early, primitive BASIC, 8086 assembly, Pascal, C, C++, Perl, HTML, Java, VB, and others. The flow of its materials presentation doesn't seem to build naturally from ground zero. Perhaps if I'd learned programming on a UNIX machine, the references in this book would be clearer.
So, heads up if you're looking to learn sed and awk. This book can probably be of some help (especially if you're a UNIX geek), but you may well need to augment it with a lot of on-line or other research.
It takes you through the basics of sed and awk, shows you regular expression syntax and delves deeper into both programs. For sed it shows you all of the basic sed commands as well as many of the more advanced commands such as multiline pattern spaces. With awk it goes even deeper as awk is a more powerful program. It shows the basics for writing awk scripts then takes you into flow control, functions and debugging.
I find the writing to be concise and clear with many examples to show you how it works in the real world.
All in all it's a great book for the unix admin or programmer to have on their bookshelf.
You can either spend the rest of eternity with a text editor or get these guys, and learn a bit to instruct them to do totally boring but useful drudgery. And perhaps learn about regular expressions and pattern matching. And then do something interesting.
Don't worry, you will have do do it again, if for no other reason than the entity that controls the format of the data decided to change it, for no other reason than to annoy and confound you. But, since you have learned about pattern matching, a minor change will fix it, and you can go back to whatever.
The specific purpose this time was to avoid subscribing to a listing service for cable tv programming. Zap2it publishes the listings on most newspaper websites, and program called wget allows me to write these listings to a file. Then using sed to slice and dice allows me to read simply formatted listings, and eventually feed them to a recording system.
- 图书 > 进口原版 > Computers & Technology（计算机与科技） > Operating Systems（操作系统） > Linux
- 图书 > 进口原版 > Computers & Technology（计算机与科技） > Operating Systems（操作系统） > Unix
- 图书 > 进口原版 > Computers & Technology（计算机与科技） > Programming（编程） > Languages & Tools
- 图书 > 进口原版 > Computers & Technology（计算机与科技） > Programming（编程） > Software Design, Testing & Engineering > Software Development
- 图书 > 进口原版 > Reference（参考书）