Computerworld
The A-Z of Programming Languages: AWK
Alfred V. Aho of AWK fame talks about the history and continuing popularity of his pattern matching language.
Naomi Hamilton  27 May, 2008 09:43

Computer scientist and compiler expert Alfred V. Aho is a man at the forefront of computer science research. He has been involved in the development of programming languages from his days working as the vice president of the Computing Sciences Research Center at Bell Labs to his current position as Lawrence Gussman Professor in the Computer Science Department at Columbia University.

As well as co-authoring the 'Dragon' book series; Aho was one of the three developers of the AWK pattern matching language in the mid-1970's, along with Brian Kernighan and Peter Weinberger.

Computerworld recently spoke to Professor Aho to learn more about the development of AWK, in the first of a series of investigations into the most widely-used programming languages.

How did the idea/concept of the AWK language develop and come into practice?

As with a number of languages, it was born from the necessity to meet a need. As a researcher at Bell Labs in the early 1970s, I found myself keeping track of budgets, and keeping track of editorial correspondence. I was also teaching at a nearby university at the time, so I had to keep track of student grades as well.

I wanted to have a simple little language in which I could write one- or two-line programs to do these tasks. Brian Kernighan, a researcher next door to me at the Labs, also wanted to create a similar language. We had daily conversations which culminated in a desire to create a pattern-matching language suitable for simple data-processing tasks.

We were heavily influenced by GREP, a popular string-matching utility on UNIX, which had been created in our research center. GREP would search a file of text looking for lines matching a pattern consisting of a limited form of regular expressions, and then print all lines in the file that matched that regular expression.

We thought that we'd like to generalize the class of patterns to deal with numbers as well as strings. We also thought that we'd like to have more computational capability than just printing the line that matched the pattern.

So out of this grew AWK, a language based on the principle of pattern-action processing. It was built to do simple data processing: the ordinary data processing that we routinely did on a day-to-day basis.. We just wanted to have a very simple scripting language that would allow us, and people who weren't very computer savvy, to be able to write throw-away programs for routine data processing.

Comments

Re: great article

Thanks for this very interesting insight on awk!

After years of less technical tasks, last week I started to use it again, and it is just fantastically simple to use and powerful in its result.

Great job Aho, Weimberger and Kernighan!

Good work

First, sorry for my english. Than you for great dialogue with Alred Aho. AWK is my favourite programming language because is it easy-to-use and very effective tool to make small programs and scripts. Thank you :-)

Hooray for awk!

I have been using gawk (the gnu version of awk) for years as my general-purpose language of choice. I have put together multi-thousand line programs for such things as text formatting and a complicated simulation.

Note: I always use the "lint" option to catch errors, along with anything else I can.

I just today installed gawk in Ubuntu 8.04 (under vmware in mac os x) - annoyingly, it was not found in the usual "add/remove programs" and I had to search for it. Fortunately, giyf.

Post new comment

Login or register to link comments to your user profile, or you may also post a comment without being logged in.
The content of this field is kept private and will not be shown publicly.
Enter the fully qualified URL, eg. http://www.example.com/
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Alfred Aho
Alfred Aho
Zones
Zone logoZones provide focussed content from Computerworld and leading technology partners.
Newsletter Subscription
Newsletter Subscription
Sign up for our Computerworld newsletters!
Syndicate content Syndicate content
 

Computerworld Webinar

Thursday, June 11th, 2009
10:30am EST (Sydney, Australia)
Screening at your PC

Computerworld is hosting a 30 minute live webinar to help you to learn how unified communications can save you money, foster innovation and business agility by making it easier for people to find, reach and collaborate with one another.

Register Now

Computerworld Community Comments
Whitepaper

LANPlanner | Ensuring High Performance WLAN Networks

Learn how the Motorola LANPlanner facilitates prompt and precise planning and the design and measurement of robust 802.11a/b/g/n networks. Download this paper now to discover how to take wireless network performance to the next level.

Enterprise IT Buyer's Guide
Find Technology Vendors Fast
 
Find vendors by name | Find by category
Sponsored Links
 
Send Us E-mail | Privacy Policy
Features List | Media Kit | Advertising | Contact Us

Copyright 2009 IDG Communications. ABN 14 001 592 650. All rights reserved.
Reproduction in whole or in part in any form or medium without express written permission of IDG Communications is prohibited.