awk
awk copied to clipboard
One true awk
The `xfree` macro checks that the pointer is non-`NULL` before calling `free(3)`. This is unnecessary. From the [man page](https://manpages.debian.org/bullseye/manpages-dev/free.3.en.html): If ptr is NULL, no operation is performed. As a general...
Using the regular expression `$^` as a pattern, for example by running `awk /$^/`, causes the following error: awk: syntax error in regular expression $^ at source line number 1...
The latest commit (as of this report) of onetrueawk cannot built release 2022b of the IANA tz database. Steps to reproduce 1. Use latest commit from this repository; build awk...
Hello 👋 I run a security community that finds and fixes vulnerabilities in OSS. A researcher (@fish98) has found a potential issue, which I would be eager to share with...
In a freshly cloned and built source: ``` $ git branch * master $ git log -n1 --oneline 2402014 (HEAD -> master, origin/staging, origin/master, origin/HEAD) Eliminate file management memory leak...
After applying the patch in Issue #112 and running valgrind --leak-check=full with the same program, there is a leak: ==5226== Memcheck, a memory error detector ==5226== Copyright (C) 2002-2017, and...
The historic behavior of awk has been to make -Ft mean -F\t. However, that's a bit of a wart and antiquated. Make this behavior optional based on a simple ifdef...
FS is not set when it's a value assigned on the command line: ``` $ cat > t1 1,2 3 4,5 6 shephard@Gordons-Air:~ $ awk '{printf "x"FS"x "; print $1":"$2}'...
I think I just found a strange behavior in awk in which setting FS="[ ,]" doesn't work until at least one line in a file is read: ``` $ cat...
Using the code from master as of today, I found the following bug. Given: ```sh BEGIN { print match("abc-def", /[qrs---tuv]/) } ``` The One True Awk prints a result of...