I read it on a whim after hearing the accolades awk would get from people when it came to text munging, and as I have to do a lot of it at work, I figured I'm bound to come across practical situations for my own purposes once I get a few basics from the guide.
And sure enough, I did. I love the original simply because it helped me understand the scope of tasks I should look at for awk; I could just think about my own difficulties with handling large amount of text data (mostly very verbose logging), and then create a workflow in awk that mimicked my actual work, but vastly expedited.
The article linked is nice and cute, but it more or less is a rehash of the topics covered in The AWK Programming Language, which isn't bad (more data is good), but I feel the original handles the explanations far far better and helps you to really understand what awk is good at and when to attack with awk versus when your task is better suited for something else.
Since threads like these are always filled will praise about the book, I started reading it and was quite excited about it.
The book is excellent, but the target audience it is written for won't read it today. It is written for people that pretty much have never programmed anything before. For someone that is knowledgeable of computing in general, or programming and possibly even already have a vague idea of what AWK is, it becomes very verbose.
I get it, it is a cool way to at the learn some history and the context of which it was created. But if the sole goal is to quickly learn AWK I feel that it is quite ineffective and it becomes hard to focus when there is so little relevant content.
I lost focus and didn't finish.
I would like to pick it up again in a less stressful time. The thing that holds me back is that I'm not sure I will get enough use of it to be able to remember it. It might be a simple language but it is very different from anything that at least I use today, and if I have to relearn it every other time I use it then there isn't much point to it.
I'd also suggest the manual/book for gawk[1] which introduces the language from the basics, covers newer features and also mentions which features are unique to gawk
Agreed! I got into AWK not because I thought I needed AWK, but because I'd heard "The AWK Programming Language" was a great book ... and sure enough, it was. Like TCPL and TGoPL, all of which share Kernighan as an author, a couple of chapters in you already know most of the language, and the rest of the book is more and more complex examples with clear but dense explanations.
After reading the first few chapters of "The AWK Programming Languages", I was inspired to write an AWK interpreter in Go: https://benhoyt.com/writings/goawk/
* please consider using the same prompt for all examples, a few of them start with `code` while some others start with `awk book` and some do not have any prompt at all
* split long chapters into smaller sections plus add section headings as links at the start of chapter
* please please please avoid parsing ls [1] you could either reuse `sales.csv` or create another sample file instead of using `ls` as source of input... for example, your `ls -l | awk '$NF ~ /c/ {print}'` example will not work if a file is name `code xyz` (note the space)
Also, I have a similar example based hundreds of gawk one-liners [2] tutorial, which I'm currently working towards publishing as a book this month with better examples, descriptions, new regex chapter, etc
I love having a variety of these types of sites available for a new language. Different learners will react well to different styles. My personal favorite is AWK in 20 Minutes: http://ferd.ca/awk-in-20-minutes.html
Im on the second page of this book and it is presented in a way that makes me want to use awk right now. I really like how this is written, it does a great job of presenting a base idea and building on it. @thewhitetulip did you plan out all of the example topics before writing each page in the manuscript?
https://en.wikipedia.org/wiki/The_AWK_Programming_Language
I read it on a whim after hearing the accolades awk would get from people when it came to text munging, and as I have to do a lot of it at work, I figured I'm bound to come across practical situations for my own purposes once I get a few basics from the guide.
And sure enough, I did. I love the original simply because it helped me understand the scope of tasks I should look at for awk; I could just think about my own difficulties with handling large amount of text data (mostly very verbose logging), and then create a workflow in awk that mimicked my actual work, but vastly expedited.
The article linked is nice and cute, but it more or less is a rehash of the topics covered in The AWK Programming Language, which isn't bad (more data is good), but I feel the original handles the explanations far far better and helps you to really understand what awk is good at and when to attack with awk versus when your task is better suited for something else.