Hacker News new | past | comments | ask | show | jobs | submit login

Greybeard here. Just blogged about this very topic a couple of weeks ago: “The Unreasonable Effectiveness of Awk”

https://stephenramsay.net/posts/unreasonable-awk.html




Nice!

You could also use

    BEGIN {
      FS = “: “
    }
Which sets the field separator. This would put the keywords into $2 and remove the need for the gensubs :)


It's much shorter to set the field separator with an option: awk -F": " or awk -F ": " do the same thing.


Well, look at that. Thanks!


In both your essays, you have some text surrounded by square brackets: are these intentded to render out as hyperlinks?


Yes. Are they not!?


They are now. Some of them weren't. Maybe it was a local error for me. Or maybe PEBCAK.

Anyway, cool blog. I'm reading it.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: