Hello!

I am pleased to announce a new version of my CLI text processing with GNU awk ebook. Examples, exercises, solutions, descriptions and external links were added/updated/corrected.

Learn the GNU awk command step-by-step from beginner to advanced levels with hundreds of examples and exercises. This book will dive deep into field processing, show examples for filtering features, multiple file processing, how to construct solutions that depend on multiple records, how to compare records and fields between two or more files, how to identify duplicates while maintaining input order and so on. Regular expressions will also be discussed in detail.


Release offers🔗

To celebrate the new release, you can download PDF/EPUB versions of CLI text processing with GNU awk for FREE till 31-August-2023. You can still pay if you wish ;)

Other offers:

  • Magical one-liners is $5 (normal price $15) — grep, sed, awk, perl and ruby one-liners bundle
  • All Books Bundle is $12 (normal price $32) — all my 13 programming ebooks

What's new?🔗

  • Command version updated to GNU awk 5.2.2
  • Many more exercises added, and you can practice some of them using this interactive TUI app
  • Long sections split into smaller ones
  • In general, many of the examples, exercises, solutions, descriptions and external links were updated/corrected
  • Updated Acknowledgements section
  • Code snippets related to info/warning sections will now appear as a single block
  • Book title changed to CLI text processing with GNU awk
  • New cover image
  • Images centered for EPUB format

Videos🔗

On this blog, I post tips covering Python, command line tools and Vim. Here are video demos for these tips:


Interactive TUI app🔗

I also wrote an interactive TUI app based on some of the exercises from the ebook. Reference solutions are also provided.

Sample screenshot from the interactive TUI app for awk exercises


Table of Contents🔗

  1. Preface
  2. Installation and Documentation
  3. awk introduction
  4. Regular Expressions
  5. Field separators
  6. Record separators
  7. In-place file editing
  8. Using shell variables
  9. Control Structures
  10. Built-in functions
  11. Multiple file input
  12. Processing multiple records
  13. Two file processing
  14. Dealing with duplicates
  15. awk scripts
  16. Gotchas and Tips
  17. Further Reading

Web version🔗

You can also read the book online here: https://learnbyexample.github.io/learn_gnuawk/.


GitHub repo🔗

Visit https://github.com/learnbyexample/learn_gnuawk for markdown source, example files, exercise solutions, sample chapters and other details related to the book.

info See also my blog post on how to customize pandoc for generating beautiful PDF/EPUB versions from GitHub style markdown.


Newsletter🔗

Subscribe to learnbyexample weekly — free newsletter covering programming resources, updates on what I am creating, tips, tools, free ebooks and more, delivered every Friday.


Feedback and Errata🔗

I would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, Gumroad rating, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on. Reader feedback is essential and especially so for self-published authors.

You can reach me via:

Happy learning :)