Buying Options
Effective awk Programming, Third Edition
Print $44.99
Add to Cart
Print+Ebook $49.49
Add to Cart
Ebook $35.99
(PDF)
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £30.50
Add to Cart
What is this?
Description
Effective awk Programming delivers complete coverage of the gawk 3.1 language and the most up-to-date coverage of the POSIX standard for awk available anywhere. Author Arnold Robbins clearly distinguishes standard awk features from GNU awk (gawk)-specific features, shines light into many of the "dark corners" of the language, and devotes two full chapters to example programs. A brand new chapter is devoted to TCP/IP networking with gawk. This book is the official "User's Guide" for the GNU implementation of awk.
Full Description
Table of Contents
  1. The awk Language and gawk

    1. Chapter 1 Getting Started with awk

      1. How to Run awk Programs
      2. Datafiles for the Examples
      3. Some Simple Examples
      4. An Example with Two Rules
      5. A More Complex Example
      6. awk Statements Versus Lines
      7. Other Features of awk
      8. When to Use awk
    2. Chapter 2 Regular Expressions

      1. How to Use Regular Expressions
      2. Escape Sequences
      3. Regular Expression Operators
      4. Using Character Lists
      5. gawk-Specific Regexp Operators
      6. Case Sensitivity in Matching
      7. How Much Text Matches?
      8. Using Dynamic Regexps
    3. Chapter 3 Reading Input Files

      1. How Input Is Split into Records
      2. Examining Fields
      3. Non-constant Field Numbers
      4. Changing the Contents of a Field
      5. Specifying How Fields Are Separated
      6. Reading Fixed-Width Data
      7. Multiple-Line Records
      8. Explicit Input with getline
    4. Chapter 4 Printing Output

      1. The print Statement
      2. Examples of print Statements
      3. Output Separators
      4. Controlling Numeric Output with print
      5. Using printf Statements for Fancier Printing
      6. Redirecting Output of print and printf
      7. Special Filenames in gawk
      8. Closing Input and Output Redirections
    5. Chapter 5 Expressions

      1. Constant Expressions
      2. Using Regular Expression Constants
      3. Variables
      4. Conversion of Strings and Numbers
      5. Arithmetic Operators
      6. String Concatenation
      7. Assignment Expressions
      8. Increment and Decrement Operators
      9. True and False in awk
      10. Variable Typing and Comparison Expressions
      11. Boolean Expressions
      12. Conditional Expressions
      13. Function Calls
      14. Operator Precedence (How Operators Nest)
    6. Chapter 6 Patterns, Actions, and Variables

      1. Pattern Elements
      2. Using Shell Variables in Programs
      3. Actions
      4. Control Statements in Actions
      5. Built-in Variables
    7. Chapter 7 Arrays in awk

      1. Introduction to Arrays
      2. Referring to an Array Element
      3. Assigning Array Elements
      4. Basic Array Example
      5. Scanning All Elements of an Array
      6. The delete Statement
      7. Using Numbers to Subscript Arrays
      8. Using Uninitialized Variables as Subscripts
      9. Multidimensional Arrays
      10. Scanning Multidimensional Arrays
      11. Sorting Array Values and Indices with gawk
    8. Chapter 8 Functions

      1. Built-in Functions
      2. User-Defined Functions
    9. Chapter 9 Internationalization with gawk

      1. Internationalization and Localization
      2. GNU gettext
      3. Internationalizing awk Programs
      4. Translating awk Programs
      5. A Simple Internationalization Example
      6. gawk Can Speak Your Language
    10. Chapter 10 Advanced Features of gawk

      1. Allowing Nondecimal Input Data
      2. Two-Way Communications with Another Process
      3. Using gawk for Network Programming
      4. Using gawk with BSD Portals
      5. Profiling Your awk Programs
    11. Chapter 11 Running awk and gawk

      1. Invoking awk
      2. Command-Line Options
      3. Other Command-Line Arguments
      4. The AWKPATH Environment Variable
      5. Obsolete Options and/or Features
      6. Known Bugs in gawk
  2. Using awk and gawk

    1. Chapter 12 A Library of awk Functions

      1. Naming Library Function Global Variables
      2. General Programming
      3. Datafile Management
      4. Processing Command-Line Options
      5. Reading the User Database
      6. Reading the Group Database
    2. Chapter 13 Practical awk Programs

      1. Running the Example Programs
      2. Reinventing Wheels for Fun and Profit
      3. A Grab Bag of awk Programs
    3. Chapter 14 Internetworking with gawk

      1. Networking with gawk
      2. Some Applications and Techniques
      3. Related Links
  3. Appendixes

    1. Appendix A The Evolution of the awk Language

      1. Major Changes Between V7 and SVR3.1
      2. Changes Between SVR3.1 and SVR4
      3. Changes Between SVR4 and POSIX awk
      4. Extensions in the Bell Laboratories awk
      5. Extensions in gawk Not in POSIX awk
      6. Major Contributors to gawk
    2. Appendix B Installing gawk

      1. The gawk Distribution
      2. Compiling and Installing gawk on Unix
      3. Installation on PC Operating Systems
      4. Reporting Problems and Bugs
      5. Other Freely Available awk Implementations
    3. Appendix C Implementation Notes

      1. Downward Compatibility and Debugging
      2. Making Additions to gawk
      3. Adding New Built-in Functions to gawk
      4. Probable Future Extensions
    4. Appendix D Basic Programming Concepts

      1. What a Program Does
      2. Data Values in a Computer
      3. Floating-Point Number Caveats
    5. Appendix E GNU General Public License

      1. Preamble
      2. Terms and Conditions for Copying, Distribution, and Modification
      3. NO WARRANTY
      4. END OF TERMS AND CONDITIONS
    6. Appendix F GNU Free Documentation License

      1. ADDENDUM: How to Use This License for Your Documents
  1. Glossary

  2. Colophon

View Full Table of Contents
Product Details
Title:
Effective awk Programming, Third Edition
By:
Arnold Robbins
Publisher:
O'Reilly Media
Formats:
  • Print
  • Ebook
  • Safari Books Online
Print Release:
May 2001
Ebook Release:
June 2009
Pages:
456
Print ISBN:
978-0-596-00070-7
| ISBN 10:
0-596-00070-7
Ebook ISBN:
978-0-596-55594-8
| ISBN 10:
0-596-55594-6
Customer Reviews
About the Author
  1. Arnold Robbins

    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.

    View Arnold Robbins's full profile page.

Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Effective awk Programming, Third Edition, is a great auk, a powerful symbol of nineteenth-century European and American arrogance toward nature. In using great auks as food and for their oil, and later collecting specimen for the kind of trivial display so popular with the inhabitants of mansions in Victorian England, mankind showed no mercy; mankind did not take care to effectively manage the few delicate populations as sustainable resources, much less treat the great auk as a living species worthy of respect. In 1844, sailors working for a British collector killed the last two great auks and stole their incubating egg on an island off the coast of Iceland.

The original penguin, great auks were large, black and white, flightless seabirds with pronounced, bent, orange beaks. The auks nested for three to four weeks each spring on craggy islands in the North Atlantic. When not nesting with their lifelong mates, great auks swam the seas in extended-family groups, occasionally deep-sea diving for large fish. Sixteenth-century sailors who exploited nesting populations for food during long voyages called the birds penguins, a name they also gave to the smaller-beaked seabirds of the Southern Hemisphere that still exist today. Jeffrey Holcomb was the production editor for Effective awk Programming, Third Edition. Claire Cloutier was the production manager. Mary Brady was the copyeditor, and Maureen Dempsey was the proofreader. Rachel Wheeler, Matt Hutchinson, and Claire Cloutier provided quality control. Kimo Carter and Matt Hutchinson provided production support. Arnold Robbins and Nancy Crumpton wrote the index. Hanna Dyer designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from Century Illustrated Monthly Magazine. Emma Colby produced the cover layout with QuarXPress 4.1 using Adobe's ITC Garamond font.

David Futato designed the interior layout based on a series design by Nancy Priest. Using a version of makeinfo modified by Phillippe Martin to create DocBook and enhanced by the author, the book was converted by the author from the Texinfo source into DocBook XML. Arnold then post-processed the generated DocBook with no less than six awk scripts (of course!), finally tuning the DocBook source files by hand. The print version of this book was created by translating the DocBook XML markup of its source files into a set of groff macros using a filter developed at O'Reilly & Associates by Norman Walsh. Steve Talbott designed and wrote the underlying macro set on the basis of the GNU troff "mgs macros; Lenny Muellner adapted them to XML and implemented the book design. The GNU groff text formatter Version 1.11.1 was used to generate PostScript output. The text and heading fonts are ITC Garamond Light and Garamond Book; the code font is Constant Willison. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia FreeHand 9 and Adobe Photoshop 6. This colophon was written by Sarah Jane Shangraw.

  • Book cover of Effective awk Programming