Skip to content

Releases: benhoyt/goawk

Version 1.8.0

18 Aug 20:52
Compare
Choose a tag to compare
  • Add support for "--", stop parsing flags when arg not prefixed with "-" #56
  • On Windows, expand wildcards in program (-f) and input filenames #55
  • Build and test on Go 1.17 - significant performance improvements

Version 1.7.0

27 Feb 04:05
Compare
Choose a tag to compare
  • Add support for fflush(): #42
  • Don't buffer stderr: 86f7096
  • Switch from Travis CI to GitHub Actions: #50
  • Change README links from godoc.org to pkg.go.dev: aed202c
  • getline: return -1 instead of erroring when reading non-existent file #41
  • Buffer output piped to commands for significant performance boost 89aae73

Version 1.6.1

09 Mar 02:46
Compare
Choose a tag to compare

Fix the precedence handling when parsing unary operators, which fixes things like the "print unique lines" idiom !seen[$0]++.

Thanks @sergeevabc. Fixes #33.

Version 1.6.0

19 Jun 01:02
Compare
Choose a tag to compare

Fix handling of single-character FS.

Per POSIX spec (and the various implementations), a 1-char FS should be handled specially as a straight string split and not a regex. However, I had overlooked this, and was only doing this in the case of "\". This fixes things like FS="|" as reported by @shah in #29 (thanks!).

Bumped up minor version, seems like a fairly significant change rather than just a patch fix.

Also fix split() to have same behavior for single-char FS.

Fixes #29.

Version 1.5.1

28 Apr 22:00
Compare
Choose a tag to compare

Change command line parsing to allow -F and similar flags without a space between the option and the argument (allowed by POSIX), for example -F: (thanks Arnold Robbins)

Also tweaked output of -version to be just the bare version tag so it's machine-readable. -h or --help now includes the copyright message.

First release with binaries attached (see make_binaries.sh). Thanks @cup.

Version 1.4.1

24 Jan 03:11
Compare
Choose a tag to compare

Simplify exec calls to use in/out/err fields directly rather than pipe

Version 1.4.0

21 Jan 16:11
Compare
Choose a tag to compare

Add config options for "safe mode" to prevent exec and file reads/writes. This is useful for running scripts from untrusted user input.

Version 1.3.0

13 Jan 23:10
Compare
Choose a tag to compare

Add support for delete array (with no index). Fix bug with handling of (s)printf format string with three %'s in a row.

Version 1.2.1

11 Jan 16:16
Compare
Choose a tag to compare

Make a[x] array access set the element if not present (per POSIX spec). This seems unintuitive to me, but it's very clear in the spec, and awk/gawk/mawk all do this.

Version 1.2.0

11 Jan 02:03
Compare
Choose a tag to compare

Fix a number of issues found by running (most of) the gawk test suite.

There are still a number of skipped GAWK tests (work to do), and some of GoAWK's behavior doesn't and won't ever match GAWK's 100%. I've gone for the POSIX behavior in most cases.

The full list of changes to GoAWK is:

  • Support additional POSIX escape sequences in string literals:
    \a \b \f \v \xhh (hex) \ooo (octal)
  • Fix close() to allow reopening a file after it's been closed
  • Make sub/gsub backslash handling per POSIX
  • Fix bug in RS="" handling:
    • when input is just newlines
    • when there are newlines at the start of the last record
  • Add support for ' ' (space) printf flag
  • Add parser/resolver errors for:
    • can't use function name as a parameter
    • global var %q can't also be a function
    • can't call local variable %q as function
    • duplicate parameter name %q
  • Treat FS of a single backslash as regex \\ (as other AWKs do)