Book Review: UNIX awk and sed Programmer's Interactive Workbook
Author: Peter Patsis
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 (firstname.lastname@example.org) 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/
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- The Italian Army Switches to LibreOffice
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Linux Mint 18
- Petros Koutoupis' RapidDisk
- Oracle vs. Google: Round 2
- The FBI and the Mozilla Foundation Lock Horns over Known Security Hole
- Varnish Software's Varnish Massive Storage Engine
- Privacy and the New Math
- Ben Rady's Serverless Single Page Apps (The Pragmatic Programmers)
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide