Linked by Thom Holwerda on Tue 27th May 2008 13:08 UTC, submitted by Ward D
General Development AWK is one of the most common UNIX tools to process text-based data in either files or datastreams. Written by Alfred Aho, Peter Weinberger, and Brian Kernighan, AWK "extensively uses the string datatype, associative arrays (that is, arrays indexed by key strings), and regular expressions." ComputerWorld interviewed Alfred Aho.
Permalink for comment 315848
To read all comments associated with this story, please click here.
RE[2]: what an wonderful tool
by whartung on Tue 27th May 2008 22:11 UTC in reply to "RE: what an wonderful tool"
whartung
Member since:
2005-07-06

There are other great tools, little tools that simply do their job, just to mention a few: sed, grep, cut.


AWK makes me hate cut.

Why oh why oh why can't cut compress white space just like AWK does. By default, AWK separates fields based on one or more white space.

1 2 <-- There's supposed to be several spaces here, but HTML eats them

is the same as

1 2

AWK treats the spanning white space as a single delimiter.

But oh no, not cut. Nope. If you use " " as a delimiter in cut, you'll get a field for every single space.

*sigh*

Even today, modern cut can't do that -- even as an option. So, I use AWK.

Just a pet nit...

Edited 2008-05-27 22:15 UTC

Reply Parent Bookmark Score: 2