Ask HN: What is the most amazing Awk program you've used
4 comments
I don't know about amazing, but an AWK program builds my website. Don't blame the programming language for the crappy HTML, that's completely my fault. I learned HTML1 and never really progressed, except in dribs-and-drabs.
Still, the code runs and does a pretty good job of executing the algorithm I gave it.
But I wouldn't call it amazing. Most of my AWK is small, few-liners.
I do have a story about learning the power of associative arrays, but that should be a separate post.
Still, the code runs and does a pretty good job of executing the algorithm I gave it.
But I wouldn't call it amazing. Most of my AWK is small, few-liners.
I do have a story about learning the power of associative arrays, but that should be a separate post.
Pseudo-3D shooter written completely in gawk using raycasting technique: https://github.com/TheMozg/awk-raycaster
See also this list of projects: https://github.com/freznicek/awesome-awk?tab=readme-ov-file#...
See also this list of projects: https://github.com/freznicek/awesome-awk?tab=readme-ov-file#...
Speaking of AWK and Henry Spencer, let me quote from the awf readme:
This is awf, the Amazingly Workable Formatter -- a "nroff -man" or (subset) "nroff -ms" clone written entirely in (old) awk.
It is slow and has many restrictions, but does a decent job on most manual pages and simple -ms documents, and isn't subject to AT&T's brain-damaged licensing that denies many System V users any text formatter at all. It is also a text formatter that is simple enough to be tinkered with, for people who want to experiment.
Type "make r" to run a regression test, formatting the manual page (awf.1) and comparing it to a preformatted copy (awf.1.out). Type "make install" to install it. Pathnames may need changing.
I don't know whether awf will run on 16-bit machines. Data requirements are modest, but I fear the programs are probably big enough to run awk out of space.
I can't believe I really wrote this.
Henry Spencer at U of Toronto Zoology
[email protected] utzoo!henry
13 July 1990
---
(n.b. the first release of groff was June 1990)
This is awf, the Amazingly Workable Formatter -- a "nroff -man" or (subset) "nroff -ms" clone written entirely in (old) awk.
It is slow and has many restrictions, but does a decent job on most manual pages and simple -ms documents, and isn't subject to AT&T's brain-damaged licensing that denies many System V users any text formatter at all. It is also a text formatter that is simple enough to be tinkered with, for people who want to experiment.
Type "make r" to run a regression test, formatting the manual page (awf.1) and comparing it to a preformatted copy (awf.1.out). Type "make install" to install it. Pathnames may need changing.
I don't know whether awf will run on 16-bit machines. Data requirements are modest, but I fear the programs are probably big enough to run awk out of space.
I can't believe I really wrote this.
Henry Spencer at U of Toronto Zoology
[email protected] utzoo!henry
13 July 1990
---
(n.b. the first release of groff was June 1990)
Somebody posted a git client written in awk here on hacker news today.
The recent post of a AWK program that is a GIT CLI tool moved it into the most amazing AWK program for me.
I know that Henry Spencer build a text processor and an assembler in AWK (30K lines).
What is the most amazing AWK program you've heard about / used?