Skip to content
Paperback sed & awk (Nutshell Handbooks) Book

ISBN: 0937175595

ISBN13: 9780937175590

sed & awk (Nutshell Handbooks)

Select Format

Select Condition ThriftBooks Help Icon

Selected

Format: Paperback

Condition: Very Good

$4.69
Save $23.26!
List Price $27.95

1 Available

Book Overview

For people who create and modify text files, "sed" and "awk" are power tools for editing. Most of the things that you can do with these programs can be done interactively with a text editor. However, using "sed" and "awk" can save many hours of repetitive work in achieving the same result.To master "sed" and "awk" you must thoroughly understand UNIX regular expressions, and understand the syntax of "sed" and "awk" commands. This handbook treats regular...

Customer Reviews

5 ratings

Great manual on a pair of essential tools

"sed" is one of the very early Unix commands that permitted command line processing of data files. It evolved as the natural successor to the popular "grep" command and is cousin to the later "awk", which is somewhat more flexible. sed and awk are often cited as the progenitors and inspiration for Perl. These two utilities have many things in common, including the use of regular expressions for pattern matching. Since pattern matching is such an important part of their use, the book explains UNIX regular expression syntax very thoroughly. Because there is a natural progression in learning from grep to sed to awk, all three programs are actually covered here, although the focus is on sed and awk. The focus of this book is on writing scripts for sed and awk that quickly solve an assortment of problems for the user. The book also covers scripts for solving larger problems that require more careful design and development. This book is written in the "old style" of O'Reilly manuals, in that it is a thorough and very understandable tutorial, although it may not be written in the most exciting style in the world. It can also function as a reference manual that you come back to after you learn the mechanics of the language. The following is an overview of the book from the context of the table of contents: Chapter 1 is an overview of the features and capabilities of sed and awk. Chapter 2 demonstrates their basic operations, showing a progression in functionality from sed to awk. Both share a similar command-line syntax, accepting user instructions in the form of a script. Chapter 3 describes UNIX regular expression syntax in full detail. Many new users are often intimidated by these strange looking expressions, used for pattern matching. The pattern-matching examples in this chapter largely rely on grep and egrep. Chapter 4 begins three chapters on sed, and covers the basic elements of writing a sed script using only a few sed commands. It also presents a shell script that simplifies invoking sed scripts. Chapters 5 and 6 divide the sed command set into basic and advanced commands. The basic commands parallel manual editing actions, while the advanced commands introduce simple programming capabilities. Among the advanced commands are those that manipulate the hold space, a set-aside temporary buffer. Chapter 7, begins a five-chapter section on awk, and presents awk's primary features. A number of scripts are explained, including one that modifies the output of the "ls" command. Chapter 8 describes how to use common programming constructs such as conditionals, loops, and arrays. Chapter 9 describes how to use awk's built-in functions as well as how to write user-defined functions. Chapter 10, "The Bottom Drawer", covers a set of miscellaneous awk topics that don't seem to fit anywhere else. It describes how to execute UNIX commands from an awk script and how to direct output to files and pipes. It then offers some brief advice on debugging awk scri

Excellent!

Sed and awk are, as the book adequately puts it, UNIX "powertools". Sed is quite handy and awk is even better. This book presents a breathtaking introduction to both of them, and yet still delves into the more advanced details as it constantly presents exciting and useful examples. Both sed and awk are an essential part of any UNIX operating system, and both echo with the prestige of the master programmers that designed them. Well done, Mr. Dougherty!

2 cute little guys who will work hard for you

I've had this book for 3-4 years now and find it to be my handiest reference. I even use ot more than my vi book. The raw power of sed and awk will humble even the proudest VB programmer and this book will help you get the most out of both the "Aho, Weinberg and Kernigan" and the "stream editor". The first chapter section is entitled "May You Solve Interesting Problems" a paraphrase of the old Chinese curse, but with sed and awk no problem seems insurmountable and will make all problems appear interesting. This book is an outstanding reference and will get you up and running with both of these handy little programs in no time. Just to give you an example - the first time I ever used these programs (sed and awk) I developed a cron script to query a database every day at midnight, sort the results, grabbed lines with tagged values within certain limits, added a few totals, did some averaging, "starred" the lines that departed from certain parameters, then formatted the results into a report with a header showing the dates, times and query results, statistics then packed them into a report file and e-mailed them to a dozen recipients and added a few recipients if the data was outside certain values. I did this remarkable feat by copying a few examples from the book, changing a thing or two and in the end had a little shell script that was a few K-bytes at the most. This VB guy from corporate worked on a VB version of the same function and ended up with six revisions, several megs in the executable and never was able to get it formatted right. Not to say that it couldn't be done but..... I wrote mine before lunch one day. He worked on his for weeks and weeks. Such is the power contained within should you want to tap it Grasshopper. Great book. Amaze your friends and colleagues. Have the office women ( or men) throw flowers at your feet as you enter every day - well maybe not, but this will make you more productive. You real nerds will hardly get finished with a single box of Pop Tarts before you are writing really cool scripts when using this book. Like all O'Reilly books this one is terse, practical and highly usable - just like UNIX.

Good first book on Awk & Sed

This is a great first book on awk and sed. It also has one of the clearest explanations of regular expressions I could find. I use it all the time in my database programming/data processing work. It has served me well. There are probably more advanced features of awk that are not covered in this book but for the price it is a great bargain. If you want to learn awk buy this book and you won't be disappointed. You can ignore the sections on sed if you like.

Good intro to Sed and Awk, plus more

This book had far more information on Sed and Awk than I really wanted to read, but objectively speaking, this book did a fabulous job explaining how to use both. The idea of linking them together in one book seems odd, but the author did a pretty nice job utilizing both. I particularly liked the section on debugging awk because the techniques he explained are very applicable to program debugging in general. I also found the section on regular expressions very clearly written and easy to understand (the best I have seen thus far). I wish I had read this book sooner. Also, to the credit of this book, I saved quite a lot of time recently updating about 90 flat files in seconds using sed. Awk has proven quite useful recently in another project too. Thank you Dale and Arnold!
Copyright © 2020 Thriftbooks.com Terms of Use | Privacy Policy | Do Not Sell My Personal Information | Accessibility Statement
ThriftBooks® and the ThriftBooks® logo are registered trademarks of Thrift Books Global, LLC
GoDaddy Verified and Secured