Skip to content

Version 0.6.5 (2026-10-26)

Latest

Choose a tag to compare

@github-actions github-actions released this 26 Oct 14:01

Release Notes

  • Add zawk llm [FILE...] QUESTION: print a prompt asking an LLM to write a zawk program that answers the question (the last argument, easy to edit from the shell history) about the input files, e.g. zawk llm -i csv -H family.csv 'how many adults?' | llm -x. The prompt has the command line of the run with the meaning of -i, -F, -H and -o, the first 10 lines of every file (-n; the first rows for Parquet), the schema and summary of zawk inspect for CSV, TSV, JSON, JSON Lines and Parquet input, the zawk language notes and the builtin function reference, and the zawk lint command to check the program; a short program is answered with its complete command line too
  • Add NATS subjects as input: zawk 'MSG_SUBJECT ~ /demo/ { print }' 'nats://localhost:4222/logs.>' reads the messages of the subject (wildcards * and > allowed) until Ctrl+C, then runs END and exits. Each message is read as an input file of its own in the input format (-i json, -i jsonl, -i csv -H, ...; text split by FS by default), with MSG_SUBJECT, MSG_HEADERS (e.g. MSG_HEADERS["content-type"]) and MSG_BODY; its output is written at once. A payload that cannot be parsed sets ERRNO
  • Add the match expression: match subject { pat => value, ... } returns the value of the first arm whose pattern matches, e.g. level = match $2 { "info" => 1, "error" | "fatal" => 3, /^W/ => 2, _ => 0 }. A pattern is a string, a number or a regex literal, or several joined with |; numbers compare as numbers with a strnum subject, as in gawk's switch (so 3 => ... matches 3.0). /re/ as m => value binds the groups of the match to the array m, visible only in value (/(\d+)ms/ as m => m[1] > 1000 ? "slow" : "ok"). _ matches anything and must be the last arm; without it, the value is "" when nothing matches. The subject is evaluated once; arms are separated by commas or newlines. match(s, re) is still the builtin; match (x) { starts a match expression

Install zawk 0.6.5

Install prebuilt binaries via Homebrew

brew install zawk

Download zawk 0.6.5

File Platform Checksum
zawk-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
zawk-x86_64-apple-darwin.tar.xz Intel macOS checksum
zawk-x86_64-pc-windows-msvc.zip x64 Windows checksum
zawk-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
zawk-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
zawk-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
zawk-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum