GNU Awk 5.2 arrives with new maintainer, pma support, MPFR mode and more

command-gawk

In Linux it is used to scan patterns and process language.

At the end of last month we shared here on the blog the news that Brian Kernighan, one of the creators of AWK had confirmed that continues behind the AWK code, giving support and improving this processing language (you can consult the news in the following link.)

The reason for mentioning this is that recently a new version of the GNU-Gawk implementation was released 5.2.0, of the AWK programming language.

AWK was developed in the 70s and has not undergone significant changes since the mid-80s, when the main backbone of the language was defined, which has made it possible to maintain the original stability and simplicity of the language over time and over time. past decades.

AWK was one of the first console utilities popular for managing (handling/extracting) data by maximizing the functionality of UNIX pipelines. The language provided by this utility is currently a standard in almost all modern UNIX-type operating systems, so much so that it is part of the basic UNIX specifications, so it is usually found already installed in most of them by default.

Despite his advanced age, admins still actively use AWK to perform routine work related to parsing various types of text files and generating simple resulting statistics.

This command provides a scripting language for text processing with which we can: Define variables, use strings and arithmetic operators, use flow control and loops, and generate formatted reports. Actually, Awk is more than just a simple pattern processing command, it's a whole semantic analysis language.

Main new features of GNU Awk 5.2

In this new version that is presented, it is highlighted that added experimental support for pma memory manager (persistent malloc), which allows you to save the values ​​of variables, arrays, and user-defined functions between different runs of awk.

Another change that stands out in this new version is that changed comparison logic of numbers, which aligns with the logic used in the C language. For users, the change mainly affects the comparison of Infinity and NaN values with regular numbers.

In addition to that, also it is noted that the ability to use the FNV1-A hash function on associative arrays it is enabled by setting the AWK_HASH environment variable to "fnv1a".

In BWK mode, specifying the “–traditional” flag by default enables compatibility with previously included range expressions with the “-r” (“–re-interval”) option.

The rwarray extension provides new writeall() and readall() functions to write and read all variables and arrays at once.

In addition to it, support for high-precision arithmetic, has been implemented using the MPFR library, in addition to removed from GNU Awk maintainer responsibility and transferred to a third party enthusiast. It is noted that the MPFR mode implementation of GNU Awk is considered a bug. In the event of a sustained state change, it is planned to completely remove this feature from GNU Awk.

Of the other changes that stand out from this new version:

  • Updated build infrastructure components Libtool 2.4.7 and Bison 3.8.2.
  • Removed support for compiling with CMake (code support for CMake was not in demand and was not updated for five years).
  • Added the mkbool() function to create boolean values ​​that are numbers, but are treated as a boolean type.
  • Added gawkbug script to report bugs.
  • Instant shutdown is provided on syntax errors, resolving issues using fuzzing tools.
  • There have been numerous minor code cleanups and bug fixes.
  • Support for OS/2 and VAX/VMS operating systems has been removed.

Finally, if you are interested in knowing more about it, you can check the details In the following link. 


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.