Skip to content

Releases: linux-china/zawk

Version 0.5.22 (2024-10-18)

18 Oct 15:47
Compare
Choose a tag to compare

Release Notes

  • Add eval(formula, context) function for math calculation
  • Add Resend mail service support for send_mail(), and environment variable is RESEND_API_KEY.
  • Documentation to make associative array quickly: array[$1] = $2, arr = record("{host:localhost,port:1234}"), arr = pairs("a=b,c=d").

Install zawk 0.5.22

Install prebuilt binaries via Homebrew

brew install zawk

Download zawk 0.5.22

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-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum

Version 0.5.20 (2024-10-05)

05 Oct 07:12
Compare
Choose a tag to compare

Release Notes

  • Add smtp_send(url, from, to, subject, body) function to send email
  • Add MQTT support: publish("mqtt://servername:1883/topic", body)
  • Add system2(cmd): different from system(cmd), and it will return an array with code, stdout, stderr.
  • Add cargo-binstall and cargo-dist support

Install zawk 0.5.20

Install prebuilt binaries via Homebrew

brew install zawk

Download zawk 0.5.20

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-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum

0.5.17

17 Sep 06:17
Compare
Choose a tag to compare
  • Add send_mail(from, to, subject, body) function: Now only MailerSend support, please setup MLSN_API_KEY environment variable first
  • Add pg_query(url, sql) and pg_execute(url, sql) support
  • Add read_config(file) for ini and properties files
  • JWT enhancement: Add RS, ES and JWK support

0.5.16

14 Sep 06:17
Compare
Choose a tag to compare
  • lines(text) function: friendly for http_get(url) to fetch jsonl data
  • init sub command to generate awk script file: zawk init demo.awk

0.5.15

12 Sep 14:25
Compare
Choose a tag to compare

Add query for JSON/XML/HTML:

  • JSON: json_value(json_text, json_path) and json_query(json_text, json_path)
  • XML: xml_value(xml_text, xpath) and xml_query(xml_text, xpath)
  • HTML: html_value(html_text, css_selector) and html_query(html_text, css_selector)

0.5.13

09 Sep 14:20
Compare
Choose a tag to compare

0.5.12

19 Aug 16:09
Compare
Choose a tag to compare

awk file help support

You can add help information in awk file to make awk friendly, example as following:

#!/usr/bin/env zawk -f

# @desc this is a demo awk
# @meta author linux_china
# @meta version 0.1.0
# @var nick current user nick
# @var email current user email
# @env DB_NAME database name

then you can use ./demo.awk --help to get help support.

  • @desc: description for awk file
  • @meta: metadata for script, such as author, version etc.
  • @var: variable for script, email? means that the variable is optional. Access by awk -v varName="$PWD" ' END {print varName}'.
  • @env: environment variable, access by ENVIRON["USER"].

0.5.11

11 Aug 05:11
Compare
Choose a tag to compare
  • Fix Windows version problem
  • Update to libsql 0.5.0

0.5.10

29 Jul 14:56
Compare
Choose a tag to compare
  • Add libSQL support: libsql_query() and libsql_execute()
  • Update to fend-core 1.5

0.5.9

09 Jul 14:52
Compare
Choose a tag to compare
  • Add mkpass() function
  • Add wechat, id, plate,zipcode,creditcard for fake() function