APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

2003/09/07 awk

© September 2003 Tony Lawrence

This was named for the initials of the folks who wrote it: Aho, Kernighan, and Weinberger.

It's a programming language, though you probably wouldn't want to write anything very complicated in it. It is good for simple scripting to add up columns or print only parts of lines, but the syntax does take a bit of getting used to.

You need to know what awk is, and should at least be able to read a script that uses it, but I'd suggest that you use Perl whenever otherwise tempted to use this. The man page (nowadays it is probably gnu awk or "gawk" that you actually have) probably has some examples at the end of it.

If you really want to get into it, I'd recommend O'Reilly's Sed & Awk, but I think you'd be smarter to spend that energy learning Perl.

See grep awk example script for an awk (and Perl) example. This Awk vs. Perl may also be of interest.

Got something to add? Send me email.

(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> Basic awk usage explained

Inexpensive and informative Apple related e-books:

Take Control of Preview

Take Control of OS X Server

Are Your Bits Flipped?

iOS 8: A Take Control Crash Course

Take Control of Automating Your Mac

More Articles by © Tony Lawrence

Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us

Printer Friendly Version

If debugging is the process of removing bugs, then programming must be the process of putting them in. (Edsger W. Dijkstra)

Linux posts

Troubleshooting posts

This post tagged:





Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode