6.One line programs
Many useful awk programs are as short as just a line or two. Here is a collection of useful, short programs to get you started. Some of these programs contain constructs that haven't been covered yet. The description of the program will give you a good idea of what is going on.
Here I realized that it is better to post some links and just mention some of my favorites, perhaps.
- The best AWK one-liners
- awk one-liners by *nix shell
- Handy One-line Scripts for AWK compiled by Eric Pement