Live data from Hacker News

Why Learn Awk? (2016)

blog.jpalardy.com

1–10 of 246 posts

Re: Why Learn Awk? (2016)

#5
post #2

Honorary mention of Taco Bell Programming. (fits this genre). http://widgetsandshit.com/teddziuba/2010/10/taco-bell-progra... Someone ought to write - Zen and the art of Unix tools usage.

>> suppose you have millions of web pages that you want to download and save to disk for later processing. How do you do it?

I don't know enough about the 'real way' or the 'taco bell way', but interested to know --- is this doable the way Ted describes in the article via xargs and wget?

Re: Why Learn Awk? (2016)

#9
Because for some bizarre reason, "cut" doesn't ship with any decent column selection logic that is the equivalent of awk's $1, $2, etc., even in 2020.

That's like 90% of my use of awk right there. I don't know of any easier equivalent of "awk '{ print $2 }'" for what it does.

Posted partially so the Internet Correction Squad can froth at the mouth and set me straight, because I'd love to be showed to be wrong here.

Re: Why Learn Awk? (2016)

#10
Awk, like shell, is a fraught programming environment, full of silent failure and hidden gotchas. Even for one-liners.

I use shell because I have to, not because I like it. I dread maintaining shell scripts which have a bunch of awk and sed in them.

The Unix ideal of small single-purpose tools and text processing is separable from these old warhorses.

Post reply on HN