10 comments

[ 6.5 ms ] story [ 52.3 ms ] thread
This is an exact copy of http://www.ibm.com/developerworks/linux/library/l-awk1.html?..., not sure who's copying who...but the article on IBM is from July 2008
Funtoo is Daniel Robbins site and the article you've linked is credited to Daniel Robbins as well.

Really nice introduction to awk. I've been meaning to dig a bit deeper into it and this is straightforward and easy.

Also, from the right side of the page: "This article was originally published on IBM developerWorks."
Thanks, I was interested in an Awk learning resource, and this looks like exactly what I would want.
You might also take a look at Sed & Awk, co-authored by Daniel Robbin's father, Arnold Robbins.

http://books.google.com/books?id=m4ZzElQZxcoC&dq=sed+awk...

TY, I'll bookmark that as well for when I finish the other one.
_The Awk Programming Language_ is vastly better, IMHO, and half the size. Brian Kernighan co-wrote it. It's that good.

The awk chapters in Bentley's _Programming Pearls_ and _More Programming Pearls_ and Peteris Krumins's Awk One-Liners series (http://www.catonmat.net/blog/awk-one-liners-explained-part-o...) are worth a read, as is the source for awk. (nawk, at least - haven't looked at gawk).

$ awk -F":" '{ print "username: " $1 "\t\tuid:" $3" }' /etc/passwd awk: { print "username: " $1 "\t\tuid:" $3" } awk: ^ unterminated string

Needs to be

$ awk -F":" '{ print "username: " $1 "\t\tuid:" $3 }' /etc/passwd

(comment deleted)