25 used & new from $21.50

Have one to sell? Sell yours here
 
 
Effective awk Programming (3rd Edition)
 
 
Tell the Publisher!
I’d like to read this book on Kindle

Don’t have a Kindle? Get your Kindle here.
 
  

Effective awk Programming (3rd Edition) (Paperback)

~ (Author)
4.4 out of 5 stars  See all reviews (5 customer reviews)


Available from these sellers.


13 new from $35.42 12 used from $21.50

Formats

Amazon Price New from Used from
  Paperback, May 31, 1997 -- $27.00 $23.12
  Paperback, May 15, 2001 -- $35.42 $21.50
Like this book? Find similar titles from O'Reilly and Partners in our O'Reilly Bookstore.

Customers Who Bought This Item Also Bought

sed & awk (2nd Edition)

sed & awk (2nd Edition)

by Tim O'Reilly
4.3 out of 5 stars (40)  $23.07
sed and awk Pocket Reference, 2nd Edition

sed and awk Pocket Reference, 2nd Edition

by Arnold Robbins
4.7 out of 5 stars (6)  $9.95
The AWK Programming Language

The AWK Programming Language

by Alfred V. Aho
4.9 out of 5 stars (17)  $83.70
Classic Shell Scripting

Classic Shell Scripting

by Nelson H. F. Beebe
4.6 out of 5 stars (10)  $18.59
Bash Cookbook: Solutions and Examples for Bash Users (Cookbooks (O'Reilly))

Bash Cookbook: Solutions and Examples for Bash Users (Cookbooks (O'Reilly))

by Carl Albing
4.6 out of 5 stars (12)  $31.49
Explore similar items

Editorial Reviews

Amazon.com Review

For anyone who writes scripts in the awk family of languages, the third edition of Effective awk Programming provides an in-depth guide to processing text files with plenty of working sample code. Whether you are starting out with awk or are an experienced developer, this book will help you extend the reach of your awk scripts.

This tutorial covers the entire spectrum of awk script development: From the basics of opening, searching, and transforming text files, to a comprehensive tutorial for regular expressions, to more advanced features like internetworking. The focus is on the practical side of creating and running awk scripts, and there's plenty of hands-on advice for installing and running today's awk (and gawk).

The book begins with the fundamentals of awk for opening and transforming text flat files. The coverage of regular expressions, from simple rules for matching text to more advanced options, is particularly solid. You learn how to add variables and expressions for more intelligent awk scripts, plus how to parse data into records and fields. You'll also find out how to redirect output from awk scripts to other programs, a useful technique that can cause awk to get a lot more done in real applications.

Later, you learn several valuable sample awk scripts that mimic existing Unix utilities (like grep, id, and split), plus samples for counting words in documents and printing mailing labels, and even a stream editor. This grab bag of sample code lets you try out the techniques presented earlier in the book. Other sections look at support for networking in today's gawk; for example, how gawk can read and write to URLs on the network almost just as easily as local files. Full sample code will teach the beginner or expert how to get productive with networks and awk. Final appendices trace the evolution of the awk language and show you how to download and install gawk.

Suitable for beginner and experienced awk developers, Effective awk Programming, Third Edition, is an extremely worthwhile source of information on a wide range of programming techniques for today's awk. --Richard Dragan

Topics covered:

  • Introduction to the awk programming language
  • Running awk scripts
  • Basic file processing
  • Tutorial for regular expressions
  • Strategies for matching text
  • Dynamic regular expressions
  • Parsing data into records and lines (including separating fields and handling multiple-line records)
  • Using print and printf for printed output with awk (including format specifiers)
  • Redirecting awk scripts output to other processes
  • Basic and advanced awk expressions (constants, variables, and function calls)
  • Patterns
  • Shell variables and actions
  • Arrays (including multidimensional arrays and sorting)
  • Built-in and custom awk functions
  • Internationalizing and localizing awk scripts
  • Advanced gawk (communicating with other processes and networking programming)
  • Running awk and gawk
  • Sample awk scripts
  • Internetworking with awk
  • History and evolution of awk
  • Downloading and installing gawk


Review

'After reading this book you will immediately be rushing to your keyboard to try it out. Some useful hits and tips. Array processing is also covered here. It is a good book. However nothing replaces experience. So read it and try it out.' plomax@oriole.com 'Highly recommended.' - Peter S Tillier, Cvu, December 2001

Product Details

  • Paperback: 456 pages
  • Publisher: O'Reilly Media; 3 edition (May 15, 2001)
  • Language: English
  • ISBN-10: 0596000707
  • ISBN-13: 978-0596000707
  • Product Dimensions: 9.2 x 7 x 1 inches
  • Shipping Weight: 1.7 pounds
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (5 customer reviews)
  • Amazon.com Sales Rank: #451,305 in Books (See Bestsellers in Books)

More About the Author

Arnold Robbins
Discover books, learn about writers, read author blogs, and more.

Visit Amazon's Arnold Robbins Page

Inside This Book (learn more)
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:


What Do Customers Ultimately Buy After Viewing This Item?

Effective awk Programming (3rd Edition)
55% buy the item featured on this page:
Effective awk Programming (3rd Edition) 4.4 out of 5 stars (5)
sed & awk (2nd Edition)
22% buy
sed & awk (2nd Edition) 4.3 out of 5 stars (40)
$23.07
The AWK Programming Language
9% buy
The AWK Programming Language 4.9 out of 5 stars (17)
$83.70
Classic Shell Scripting
7% buy
Classic Shell Scripting 4.6 out of 5 stars (10)
$18.59

Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(3)
(2)
(1)
(1)
(1)
(1)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

 

Customer Reviews

5 Reviews
5 star:
 (2)
4 star:
 (3)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.4 out of 5 stars (5 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
29 of 30 people found the following review helpful:
5.0 out of 5 stars Most Complete Coverage of Awk, February 1, 2002
By Primoz Peterlin (Ljubljana, Slovenia) - See all my reviews
Awk is one of those handy Unix tools with which you can easily impress people. Using a simple

/pattern/ { action }

syntax, you can construct powerful one-liners. Do you want to how much time in total you spent surfing the Internet? Here it is:

awk '/Connect time/ { s += $8 } END { print s }' /var/log/messages

It doesn't get much shorter in any other programming language, does it? Need to strip text of HTML tags? Need a frequency count of words in a text? Awk is the perfect tool for tasks like this. With its pattern-action structure, powerful regular expression mechanism, associative arrays and basic program flow control, it provides a powerful tool for manipulating flat text files. Even though other scripting languages may be richer in features, there exists a niche where Awk is just the right tool to do the job.

Arnold Robbins, the author of this book as well as of several other books on Awk, serves also as the maintainer of GNU Awk (gawk for short), the most influential version of Awk available today. With the version 3.10, released in 2001, GNU Awk became richer for a handful of new extensions over traditional Awk, most important among them are the TCP/IP networking and the support for internationalization. All new extensions are described in the book. How successful these new extensions will be is doubtful, however. Networking scripting niche is already well covered with Perl and Python, and internationalization doesn't really matter much in short throw-away scripts Awk is usually used for.

With all due respect to the creators of Awk and their book (Alfred V. Aho, Peter J. Weinberger, Brian W. Kernighan, The Awk Programming Language, Addison-Wesley, 1988), I have to say that "Effective Awk Programming" is probably the best Awk tutorial on the market today. If you are serious about learning Awk, you shouldn't be without it. If you are still hesitating whether it wouldn't be wiser investing those 28 USD elsewhere, here is chance to read it before you buy it: install GNU Awk 3.10, and the Texinfo source of the book comes with it. But sooner or later you will find O'Reilly RepKover binding too tempting...

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
8 of 9 people found the following review helpful:
4.0 out of 5 stars awk programming, May 18, 2001
By Geoffrey D. Boyd (St. Louis, MO United States) - See all my reviews
This book is being picked up by the O'Reilly people. I have many of the O'Reilly books on my book shelf. There will be a third edition due out in July with Robbins as the author. I read though this book and thought it as good or better than the "Sed & awk" book that O'Reilly presently has out. Robbins is also an author on this book. I thought the book to be better than the "AWK programming language" by Aho, Kerninghan and Weinberger, the original authors of the AWK language. I recommend the book to beginers as I am.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
2 of 2 people found the following review helpful:
5.0 out of 5 stars Excellent tutorial & reference that zeroes in on awk, January 17, 2007
By calvinnme "Texan refugee" (Fredericksburg, Va) - See all my reviews
(TOP 10 REVIEWER)      
This book explains both the awk language and how to run the awk utility. You should already be familiar with basic system commands, such as cat and ls, as well as basic shell facilities, such as input/output redirection and pipes. This book describes the awk language in general and also the particular implementation of awk called gawk. gawk runs on a broad range of Unix systems and has also been ported to Mac OS X, MS-DOS, Microsoft Windows, and VMS.

Many people are familiar with O'Reilly's book on sed and awk, but not this book. If you want to zero in on awk and its capabilities, this is really the better of the two books. It makes an excellent tutorial and reference for system administrators and anyone else that wants to use awk to extract and format text. The following is a description of the book from the context of the table of contents:

Chapter 1. The awk language and gawk - talks about the basics including how to run awk, when you should use awk, and starts you off with a few simple examples.

Chapter 2. Regular expressions - introduces regular expressions in general, and in particular the flavors supported by POSIX awk and gawk.

Chapter 3 Reading Input Files - describes how awk reads your data. It introduces the concepts of records and fields, as well as the getline command. I/O redirection is first described here.

Chapter 4. Printing Output - Besides basic and formatted printing, this chapter also covers I/O redirections to files and pipes, introduces the special filenames that gawk processes internally, and discusses the close built-in function.

Chapter 5. Expressions - describes expressions, which are the basic building blocks of awk patterns and actions.

Chapter 6. Patterns, Actions, and Variables - Each awk statement consists of a pattern with an associated action. This chapter describes how you build patterns and actions, what kinds of things you can do within actions, and awk's built-in variables.

Chapter 7. Arrays in awk - describes how arrays work in awk, how to use array elements, how to scan through every element in an array, and how to remove array elements. It also describes how awk simulates multidimensional arrays, as well as some of the less obvious points about array usage. The chapter finishes with a discussion of gawk's facility for sorting an array based on its indices.

Chapter 8. Functions - describes awk's built-in functions, which fall into three categories: numeric, string, and I/O. gawk provides additional groups of functions to work with values that represent time, do bit manipulation, and internationalize and localize programs.

Chapter 9. Internationalization with gawk - describes the underlying library gawk uses for internationalization, as well as how gawk makes internationalization features available at the awk program level. Having internationalization available at the awk level gives software developers additional flexibility - they are no longer required to write in C when internationalization is a requirement.

Chapter 10. Advanced Features of gawk - a "grab bag" of items that are otherwise unrelated to each other. First, a command-line option allows gawk to recognize nondecimal numbers in input data, not just in awk programs. Next, two-way I/O, discussed briefly in earlier parts of this book, is described in full detail, along with the basics of TCP/IP networking and BSD portal files. Finally, gawk can profile an awk program, making it possible to tune it for performance.

Chapter 11. Running awk and gawk - covers how to run awk, both POSIX-standard and gawk-specific command-line options, and what awk and gawk do with non-option arguments. It then proceeds to cover how gawk searches for source files, obsolete options and/or features, and known bugs in gawk. This chapter rounds out the discussion of awk as a program and as a language. While a number of the options and features described here were discussed in passing earlier in the book, this chapter provides the full details.

Chapter 12. A Library of awk Functions - One valuable way to learn a new programming language is to read programs in that language. To that end, this chapter and Chapter 13 provide a good-sized body of code for you to read, and hopefully, to learn from.

Chapter 13. Practical awk Programs - presents a potpourri of awk programs for your reading enjoyment. The first part describes how to run the programs presented in this chapter. The second presents awk versions of several common POSIX utilities. These are programs that you are hopefully already familiar with, and therefore, whose problems are understood. By reimplementing these programs in awk, you can focus on the awk-related aspects of solving the programming problem.

Chapter 14. Internetworking with gawk - describes gawk's networking features in depth, including a number of interesting examples and the reusable core of a gawk-based web server. The chapter is adapted from "TCP/IP Internetworking with gawk", by Jürgen Kahrs and Arnold Robbins, which is a separate document distributed with gawk.

Thus chapters 1-11 form a tutorial and reference on awk itself, and the last three chapters are additional material for reference or your own personal toolchest of programs. The last chapter is more of a curiosity than anything, since I don't know anyone who does internetworking with gawk, but it is still interesting material. I highly recommend this book if you plan to use awk extensively.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

4.0 out of 5 stars Old Reliable AWK
Every once in a while I am told to panic and get something done in an unreasonable amount of time. When the "something" involves text processing I sometimes return to AWK, and... Read more
Published on November 28, 2007 by Bindlestiff

4.0 out of 5 stars This book is an essential for people writing unix scripts and doing system administration
Awk is a powerful tool to perform search, and pattern matching on the strings/files.

This book is an essential for people writing unix scripts and doing system... Read more
Published on February 22, 2006 by Aruneesh Salhotra

Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   




Product Information from the Amapedia Community

Beta (What's this?)


Look for Similar Items by Category


Look for Similar Items by Subject

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.



Your Recent History

 (What's this?)

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.