The tutorial throws the user straight into the experience of using awk . There is no theoretical discussion first; there are no installation instructions; the first thing you see is an input example and a short program doing something with that input. They even get to the expected output on the very first page. I don’t think that’s an accident.5 Short note on target audience: in k&r , they wait until the second page with showing this stuff, because that book has a different target audience; the readers of that book may need some soothing words before they enter the shocking world of computer programming. The awk readers are likely familiar with programming already.

This may not sound very special. Lots of things market themselves with a complete example up-front. However, when it comes to books about technologies, that’s more rare. You often see a whole chapter in the beginning devoted to explaining the philosophy behind the technology, rather than letting the user get a feel for the philosophy themselves, by doing. It also seems common these days to have users of programming languages start out by typing expression like 4+2 in a repl . I believe this is less satisfying and further removed from real programming than creating complete programs – even if they have to be very simple to start out!

Following the first example is a high-level explanation of how the program produces the expected output, just in case you didn’t guess that already. The authors then give you just enough information on general principles so that you can start experimenting with modifying that example. This is also where they write half a page on errors – because if you don’t create errors when you modify the example code, your tinkering is not bold enough. Testing the limits of the system – even with your minimal knowledge – should be part of the process.

The tutorial goes on to introduce slightly more complicated examples based on the same input data. Only one self-contained example at a time – and still very basic stuff, but enough to get you going. In the end, the tutorial has touched briefly on every aspect of awk , but not gone into detail with anything.

At this point, there has been nearly no discussion on syntax. The reader is expected to just accept the syntax and internalise it by copying and tweaking examples.