(redirected from awk)

What is awk

awk is an extraction and reporting language, named after its three original authors:

they write:

  Awk is a convenient and expressive programming language that can be
  applied to a wide variety of computing and data-manipulation tasks.

The title of the book uses `AWK', but the contents of the book use `awk' (except at the beginning of sentences, as above). I will attempt to do the same (except perhaps at the beginning of sentences, as above).

Most implementations of awk are interpreters which read your awk source program and parse it and act on it directly.

Some vendors have developed awk compilers which will produce an executable that may be run stand-alone -- thus, the end user does not have access to the source code. There are also various awk->C converters which allow you to achieve the same functionality (by compiling the resulting C code later).

One of the most popular compilers, from Thompson Automation tawk, continues to be the subject of many positive posts in the group comp.lang.awk.

    I don't really want to start a reviews section, but it may be
    appropriate.  I think it's of general interest, and a good thing
    for the FAQ, but I don't want to be given any grief by a negative
    review I didn't write just because I'm distributing it.

    if you have a review you'd like me to put a pointer to, please
    inform me -- I already have some pointers of this form listed.

comp.lang.awk is not particularly about sed; for sed discussion. For sed related issues, there is a newsgroup alt.comp.lang.sed. See the sed FAQ (and other documents) for answers to common questions and group recommendations:

this all seems unrelated to AWK Engineering AG at http://www.awk.ch

(This text was originally imported from the comp.lang.awk faq)

Implementation Timeline

  1. 1977-1985: awk, now also known as 'old awk' or (confusingly) 'awk': the original version of the language, lacking many of the features that make it fun to play with now.
  2. 1985-1996: awk, often called 'new awk', 'nawk' or 'BWK awk': the second major incarnation of the language, reflecting the language as it is currently known and loved.
  3. gawk came to be sometime around 1986 according to the gawk-manual; in any case, it is still actively maintained now. The newest released version is 3.1.6. The GNU Project's Savannah site hosts CVS repositories for both the stable version (what will come after 3.1.6) and the development version (3.2.0 or 4.x; the gawk maintainer hasn't decided yet).
  4. 1991: Mike Brennan announces mawk on Usenet.
  5. 1996: BWK awk was released under an open license. Huzzah! This version is also still maintained and is available from Brian Kernighan's home pages at Bell Labs 1 and Princeton 2.
  6. Sometime before the present: xgawk, jawk, awkcc, Kernighan's nameless awk-to-C++ compiler, awka, tawk and busybox awk came to be.

It's a bit embarrassing to note that the exact origins of each are a bit hazy. This whole section requires further work.

Awk systems published under closed licenses are uninteresting.

(there may or may not be a WartAndWishList detailing the annoying bits of awk, and those bits that are annoying because they are missing...)