GNU AWK
GNU AWK
awesome one-liners
About the Book
This book heavily leans on examples to present options and features of awk as well as regular expressions one by one. It is recommended that you manually type each example and experiment with them. Understanding both the nature of sample input string and the output produced is essential.
You should have prior experience working with command line and bash shell, should know concepts like file redirection, command pipeline and so on. You should also be familiar with programming concepts like variables, printing, functions, control structures, arrays, etc. Knowing basics of grep and sed will help in understanding similar features of awk.
Exercises are also included to test your understanding.
Visit https://github.com/learnbyexample/learn_gnuawk for code snippets and example files used in this book. The repo also has solutions for exercises.
Testimonials
Step up your cli fu with this fabulous intro & deep dive into awk. I learned a ton of tricks! — feedback on twitter
Bundles that include this book
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
Other books by this author
The Leanpub 60-day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
80% Royalties. Earn $16 on a $20 book.
We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $12 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them