Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
GNU awk 4.1.0 (groups.google.com)
63 points by lelf on May 11, 2013 | hide | past | favorite | 10 comments


    8. New arrays: SYMTAB, FUNCTAB, and PROCINFO["identifiers"]. SYMTAB allows 
       indirect access to any defined variable or array; it is possible to 
       "walk" the symbol table, if that should be necessary. 
Can't wait for the first "awk metaprogramming" tutorials....


I don't know about metaprogramming, but you reminded me of a text regarding AI...

http://www.wra1th.plus.com/awk/awkfri.txt


It's not exactly macrology, but here's a page on functional AWK: http://awk.info/?Funky


awk is one of my favorite utilities. It's my go-to tool for any ad-hoc data reformatting and quick reports. My latest use was taking CSV files of transaction data from WePay and creating ledger [1] entries.

sed is pretty cool too but it feels a lot more arcane to me than awk.

[1] http://www.ledger-cli.org/


sed is just a cut down version of ed. Natural evolution of UNIX syntax came mainly from the 'one true' editor.

I use awk more as a anonymous function at the end of a pipeline nowadays and mainly for small stuff where I'm too lazy to use cut or when grep sed and tr may not be sufficient for complex filtering.

Surprised there isn't more of a response here on this site. Even users that don't use awk directly use a language which has been directly influenced by it like ruby and of course the original chainsaw perl.


I love using gawk for slicing and dicing huge data files. The performance and conciseness of an AWK script is hard to beat. For those interested in general resources related to AWK programming, http://awk.info/ is a great place to start.


Anyone know of example of some really big awk apps? The idea of plugging c extensions into gawk is both intriguing and slightly terrifying.


I have written gawk apps of over 10,000 lines. One was a text formatter, another was a simulator.

I also wrote a gawk program that generated a string over 300,000,000 characters long (yes - three hundred million). No problems (well, a few, but I handled them).

gawk ftw!!!


git repo anywhere?





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

Search: