Book Review: UNIX awk and sed Programmer's Interactive Workbook

Author: Peter Patsis
Publisher: Prentice-Hall
ISBN: 0-13-082675-8
Price: $34.99
Reviewer: Paul Dunne
Despite that mouthful of a title, this is not a book about UNIX. It is about three UNIX utilities, grep, sed and awk, each on their own, one after the other. Now, I learned these tools and others from the classic text, The UNIX Programming Environment by Kernighan and Pike. Although dated in parts, the treatment there crams a good deal of information into a short space and never loses sight of the fact that AWK, sed and similar tools are designed to be used in a UNIX environment, working with the shell and other UNIX tools. Ripping them out of context causes them to seem much less useful than they are. In this book, there is hardly a pipeline in sight. Not only that, we don't even see sed and AWK working together through temporary files. Each tool is considered in complete isolation. There is little point in learning about AWK and sed on their own. If one is really determined to do everything without the shell and other utilities, Perl is a proper superset of the two. AWK and sed come into their own only when considered as part of a toolset.
This book has too much padding. I don't know how many times we are told where the web site associated with the book is, but once would have been enough. I personally hate those little icons popular in books of this sort today. Each time our intrepid author mentions the web, we have a picture of a spider's web (I'm not making this up), each aside or technical tip (I don't really know what to call them—the only clue is the little icon beside each one) has a top hat affixed to it, and so on. I don't know whether this is all IDG's fault, but it was in their “For Dummies” series where I first encountered this style. There, while still objectionable to my mind (and don't get me started on said company referring to customers as “Dummies”!), it is at least well-thought-out and integrated into the book; here, it's just pointless. If I want pictures, I'll go read a comic book.
No mention is made of which AWK or sed or grep. For instance, one might be using GNU awk (gawk), nawk, mawk, MKS awk or any one of several vendor implementations, although hardly the original awk. These things matter. Are we talking strict POSIX sed and AWK here? We are not told. This topic needs to be addressed, however briefly, in any book dealing with these tools.
Is there anything I like about his book? Well, the exercises and self-review questions are frequent and, although often simple, do have the merit of being connected to the preceding subject matter, covering what you are supposed to have learned. They've been given consideration and aren't just tacked on as an afterthought.
This book might be useful for those who find the treatment in Kernighan & Pike too concise; but it needs to be supplemented, if not replaced, by a book which discusses these tools in their proper context. Personally, I find the right thing is just such a dual approach. Rely on a good learner's book, but have at hand a reference work which goes into much greater detail and can be consulted when problems or questions arise. Unfortunately, this book is neither. For instance, there is an “Awk, sed and grep” reference listed as an appendix. Turning to the appendices, we find a rather sparse reference for AWK only, with no mention of the other two.
It isn't that this is a bad book for what it does. However, what it does isn't enough and is aimed at the wrong market. The cover proclaims, “Perfect for first-time and intermediate UNIX programmers alike”. Very little is contained here for either first-time or intermediate UNIX programmers or users. It would be better suited to a Windows user who has the Cygnus Win32 toolkit and wants to know what to do with it. Even then, some coverage of the shell is almost essential. Realistically, the people who want a Win32 environment to look like UNIX are going to be people with UNIX experience, and this book is not for them. So what is the market? Well, that's the biggest problem with this book. Within its rather narrow remit, it does things well; but it doesn't have a well-defined audience. If you need to learn about sed and AWK, then the best resources remain Kernighan & Pike and O'Reilly's UNIX Power Tools.
I find it hard to recommend this book to anyone. It might possibly be useful, if supplemented by a general work on using the shell, for those who need a slow and easy introduction to sed and AWK.
Paul Dunne (paul.dunne@bigfoot.com) is an Irish writer and consultant who specalises in Linux. The only deadline he has ever met was the one for his very first article. His home page is at http:dunne.home.dhs.org/
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Validate an E-Mail Address with PHP, the Right Way
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Introduction to MapReduce with Hadoop on Linux
- Web & UI Developer (JavaScript & j Query)
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




2 hours 50 min ago
3 hours 16 min ago
5 hours 45 min ago
6 hours 18 min ago
6 hours 19 min ago
6 hours 20 min ago
6 hours 22 min ago
6 hours 23 min ago
6 hours 25 min ago
6 hours 26 min ago