Skip to content

Version 0.6.2 (2026-10-18)

Choose a tag to compare

@github-actions github-actions released this 18 Oct 16:04

Release Notes

  • Add thousands separators: f-string format specs take Python's , and _ groupings (f"{n:,}" is 1,234,567, {p:,.2f}, {n:_d}, {n:012,} is 0,001,234,567), and printf/sprintf take the ' flag (,, as gawk in an English locale, independently of the locale) and the _ flag (_): printf "%'d", 1234567. Grouping applies to d i u e E f F g G and to %s values that look like numbers; with 0 the padding zeros are grouped too, as in Python
  • Add the ?? operator: name ?? "Guest" is "Guest" when name is uninitialized, empty, zero or a string that looks like zero ("0", "0.0", "+0", as with strnums), and name otherwise; the left side is evaluated once. It binds tighter than any other operator, so "Hello " name ?? "Guest" is "Hello " (name ?? "Guest")
  • Add zawk lint: check an AWK program without running it and report the problems as JSON (valid, errors, warnings and diagnostics, each with a code, severity, message, file, line, column, the source line and a caret), so that editors and AI agents can check a program before running it. Besides syntax and type errors, it reports gawk features that zawk accepts but ignores (e.g. FIELDWIDTHS), variables read but never set, printf formats with too few arguments, calls with more arguments than the function has parameters, unknown functions, assignments to read-only variables, and NR, $0, $1 used in BEGIN. The program comes from the operand, -f files, -e sources or stdin; -v, -H, -i, -A and -p describe how the program will run, e.g. -pr also reports code whose meaning changes in parallel. Exit code is 1 when there are errors (warnings do not count)
  • Add --lint option: lint the program before running it; the JSON report goes to stderr when there are diagnostics, and the program does not run when there are errors
  • Add zawk inspect FILE: the schema, the first 10 rows and a DuckDB SUMMARIZE-like summary (min, max, approx_unique, avg, std, q25, q50, q75, count, null_percentage) of a CSV, TSV, JSON Lines or Parquet file, as monospaced tables (default) or Markdown (-o markdown), so that people and AI agents can look at the data before writing a program
  • Add zawk fmt: format AWK programs (files, -e text or stdin): blocks are indented (--indent N, default 4, or --tabs), one statement per line, normalized spaces between tokens (if (, a = b + 1, f(x, y), $NF), } else on one line; comments, blank lines (at most one in a row), literals and line breaks inside expressions are kept. -w writes the files back, --check lists the files that are not formatted and exits with 1. The result is checked to parse to the same program as the original
  • f-string placeholders now take any expression and an optional Python-style format spec: f"{NR+1}: {price:.2f} {name:>10}". A spec is [[fill]align][sign][#][0][width][.precision][type] with align one of <, >, ^ and type a printf conversion (d i o x X e E f F g G s c) or %. Behavior change: {x+1} used to stay as literal text and is now evaluated; an invalid placeholder expression is a syntax error
  • Add gawk's ERRNO: the system error message of the last failed getline < file (e.g. No such file or directory) or close() of a redirection that was never opened, so if ((getline line < f) < 0) print "cannot read " f ": " ERRNO works as in gawk

Install zawk 0.6.2

Install prebuilt binaries via Homebrew

brew install zawk

Download zawk 0.6.2

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