3 ms·
As much as I admire this, I believe that The AWK Programming Language is probably the best resource for just learning awk. https://en.wikipedia.org/wiki/The_AW
by csydas 7y ago
As much as I admire this, I believe that The AWK Programming Language is probably the best resource for just learning awk.
https://en.wikipedia.org/wiki/The_AWK_Programming_Language 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.
- arendtio 7y agoI can confirm this statement. The book is great and helped me understand that awk is a lot more than just a tool to select columns.
- boshomi 7y agoThe book is available at archive.org text achrive[1] [1] https://archive.org/details/awkprogrammingla00ahoa https://archive.org/details/awkprogrammingla00ahoa (borrow for 14 days)
- thewhitetulip 7y agoYes, that book is the best book there is. I myself learnt from it. But it is a little in depth. My idea of this book was to team awk quickly. This is an intro book and after 'discovering' awk from my book, users will surely read the larger book
- asicsp 7y agoI'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 [1] https://www.gnu.org/software/gawk/manual/gawk.html https://www.gnu.org/software/gawk/manual/gawk.html
- benhoyt 7y agoAgreed! 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/ https://benhoyt.com/writings/goawk/
- tjoff 7y agoSince 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.
- thewhitetulip 7y agoAre you talking about gawk manual or the submission?
- tjoff 7y agoThe AWK book discussed by grandparent, https://en.m.wikipedia.org/wiki/The_AWK_Programming_Language https://en.m.wikipedia.org/wiki/The_AWK_Programming_Language