The Awk Programming Language, Second Edition

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • marcel

    A modern shell (by geophile)

  • I like the idea of Unix pipelines, but I hate all the sublanguages, awk being one of the biggest. I scratched my itch and built my own shell, marcel: https://github.com/geophile/marcel.

    I mention this specifically, here, because of the CSV point. Marcel handles CSV, e.g. "read --csv foobar.csv" reads the foobar.csv file, parses the input (getting quotes and commas correct), and yields a stream of Python tuples, splitting each line of the CSV into the elements of the output tuples.

    Marcel also supports JSON input, translating JSON structures into Python equivalents. (The "What's New" section of marcel's README has more information on JSON support, which was just added.)

  • nvm

    Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

  • Awk is really great, for those knowing nvm [1], I used awk to make `nvm ls-remote` run more than 10 times faster [2] by replacing the related shell script with around 60 lines of awk script [3], and I was quite happy with the improvement.

    It's not really a one-liner, neither something big, but one can take that as an example regarding that awk is really not just for one-liners.

    Meanwhile having `--csv` support is really nice. I'd also like to see things like a builtin `length` function to be standard.

    [1]: https://github.com/nvm-sh/nvm/

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • awk-vm

    A virtual machine and assembler written in AWK.

  • Awk is awesome! Glad that they are looking to modernize the book. It wasn't really necessary, all the code examples in the original edition of the book still run just fine, although some are somewhat dated, like printing ASCII bar graphs. They also had examples of writing VMs, parsers and interpreters in the book, which run on modern implementations.[0]

    [0] https://github.com/siraben/awk-vm/blob/master/vm.awk

  • asm

    scriptable runtime-writable livecd / hardware wrangler (by 9001)

  • I have found a handful of unconventional applications for awk -- I once needed a tiny pcm pulsewave generator, and awk was surprisingly decent for the job [1].

    Aside from that I've mostly been using it for quick statistics [2], but it quickly moves into perl territory...

    1: https://github.com/9001/asm/blob/hovudstraum/etc/bin/beeps#L...

  • tokay

    Tokay is a programming language designed for ad-hoc parsing, inspired by awk.

  • [0]: https://github.com/tokay-lang/tokay

  • frawk

    an efficient awk-like language

  • sparklines

    Text-based sparklines for the command line mimicking those of Edward Tuft.

  • `sparklines`[1] is good for an overall low-res view. `termgraph`[2] is sometimes better for a higher-res, more capable view (but can be finicky about the data.)

    [1] https://github.com/deeplook/sparklines

    [2] https://github.com/mkaz/termgraph

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • termgraph

    a python command-line tool which draws basic graphs in the terminal

  • `sparklines`[1] is good for an overall low-res view. `termgraph`[2] is sometimes better for a higher-res, more capable view (but can be finicky about the data.)

    [1] https://github.com/deeplook/sparklines

    [2] https://github.com/mkaz/termgraph

  • I like how Awk is just a single executable. A single-executable Perl that includes only the core library would be great. There is Microperl [0, 1], but no idea how well it compiles with more up-to-date Perl versions.

    0: https://github.com/bentxt/microperl-standalone

    1: Original article from 2000 by the author Simon Cozens: https://www.foo.be/docs/tpj/issues/vol5_3/tpj0503-0003.html

  • Awk-Batteries

    Public AWK Directory

  • It's nice that everyone is supporting this, I've written a portable awk module that takes control of the parsing and it is SLOW (and a little buggy). I'm a little bummed that nobody will use it but this is truly a step in the right direction.

    I guess for the people that are still using nawk, you can set up an AWK envvar so you can { awk -f $AWKU/ucsv.awk -f <(echo '{print NR, $1}') }

    https://github.com/Nomarian/Awk-Batteries/blob/master/Units/...

  • busybox-w32

    WIN32 native port of BusyBox.

  • busybox

    Docker Official Image packaging for Busybox (by docker-library)

  • YouPlot

    A command line tool that draw plots on the terminal.

  • Neat! Once you're installing something to do terminal plots though, https://github.com/red-data-tools/YouPlot looks the nicest I've seen

  • ioccc-obfuscated-c-contest

    IOCCC International Obfuscated C code contest entries

  • >> Perl can also be hilariously unreadable: https://www.foo.be/docs/tpj/issues/vol4_3/tpj0403-0017.html

    Most programming languages can be obfuscated. That does not mean people write code in those programming languages like that:

    C: https://www.ioccc.org/

    Javascript: view-source:https://www.google.com/

    The truth is that insulting Perl is considered stylish by some, so many people do despite knowing little to nothing about Perl and having never used it.

  • goawk

    A POSIX-compliant AWK interpreter written in Go, with CSV support

  • TIL: GoAWK [1] - A POSIX-compliant AWK interpreter written in Go, with CSV support.

    [1]: https://github.com/benhoyt/goawk

  • textimg

    Command to convert from color text (ANSI or 256) to image.

  • > which youplot can't

    But you could feed them through `textimg`[1] to generate PNGs.

    [1] https://github.com/jiro4989/textimg

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts