Hacker News new | past | comments | ask | show | jobs | submit login
Awk by example, Part 1 -- (funtoo.org)
48 points by doki_pen on June 3, 2010 | hide | past | favorite | 9 comments



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...


_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).


TY, I'll bookmark that as well for when I finish the other one.


You might also like http://awk.info/ then.


$ 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


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."




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: