[go: up one dir, main page]

|
|
Log in / Subscribe / Register

The state of the AWK

The state of the AWK

Posted May 21, 2020 3:22 UTC (Thu) by xtifr (guest, #143)
Parent article: The state of the AWK

Awk was one of the main things that first attracted me to Unix, several geological ages ago! The idea of a simple language specifically designed for creating filters on-the-fly was a complete revelation!

I no longer overuse and abuse awk the way I did when I was young, but I still use it now and then. Often just typing on the command line!

One of my favorite tricks is running accumulators for multiple types of things:

ps aux|awk '{count[$1]++} END { for (u in count) { print u, ": ", count[u]}}'

tells me how many processes each user has. And yes, that's the sort of thing I can and do just type in when I want to know something like that. :)


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds