Lurker News
Hi,

I recently published my ebook on GNU awk one-liners [1]. It starts from the basics of awk syntax and then discusses one-liner examples. There's a chapter on regular expressions as well. The github repo has the details on how to get the PDF version, all the example files and code snippets used in the book, sample chapters as well the markdown source used to generate the PDF.
I made all my ebooks [2] free last month amidst the pandemic fears. These include GNU grep & ripgrep, GNU sed and three books on regular expressions (Python, Ruby, JavaScript).
I'd appreciate your feedback and hope the books are useful. Happy learning :)
[1] https://github.com/learnbyexample/learn_gnuawk
[2] https://learnbyexample.github.io/books/

Comments (48) 14 threads

Show all comments

Showing thread 2 of 14

tyingq2 replies#
Very nice. I had cobbled up a "one liner" (sort of) gawk webserver on here a couple a months ago: https://news.ycombinator.com/item?id=22085459

I tried making it scalable, but unfortunately, the server sockets in gawk don't set SO_REUSEPORT. So, I can't fork usable children. It does work if you use LD_PRELOAD tricks, or edit the gawk binary to change SO_REUSEADDR to SO_REUSEPORT, but both are pretty hacky.
If gawk would separate the listen() and accept() calls out, you could do a lot more with their server socket code.

asicsp#
impressive, if I use -o option to get a pretty printed version, it comes to 68 lines
obituary_latte1 reply#
Very cool. Works on iOS with iSH surprisingly.

    FOUND index.html
    FOUND favicon.ico
tyingq1 reply#
Oh wow. I wouldn't have guessed iSH would have packaged up the extensions I'm using.
obituary_latte#
Had to `apk add gawk` is all.