Releases: linux-china/zawk
Releases · linux-china/zawk
Version 0.5.22 (2024-10-18)
Release Notes
- Add
eval(formula, context)
function for math calculation - Add Resend mail service support for
send_mail()
, and environment variable isRESEND_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)
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 fromsystem(cmd)
, and it will return an array withcode
,stdout
,stderr
. - Add
cargo-binstall
andcargo-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
- Add
send_mail(from, to, subject, body)
function: Now only MailerSend support, please setupMLSN_API_KEY
environment variable first - Add
pg_query(url, sql)
andpg_execute(url, sql)
support - Add
read_config(file)
for ini and properties files - JWT enhancement: Add RS, ES and JWK support
0.5.16
lines(text)
function: friendly forhttp_get(url)
to fetch jsonl datainit
sub command to generate awk script file:zawk init demo.awk
0.5.15
Add query for JSON/XML/HTML:
- JSON:
json_value(json_text, json_path)
andjson_query(json_text, json_path)
- XML:
xml_value(xml_text, xpath)
andxml_query(xml_text, xpath)
- HTML:
html_value(html_text, css_selector)
andhtml_query(html_text, css_selector)
0.5.13
- Add
tsid()
function: https://crates.io/crates/tsid
0.5.12
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 asauthor
,version
etc.@var
: variable for script,email?
means that the variable is optional. Access byawk -v varName="$PWD" ' END {print varName}'
.@env
: environment variable, access byENVIRON["USER"]
.
0.5.11
- Fix Windows version problem
- Update to libsql 0.5.0
0.5.10
- Add libSQL support:
libsql_query()
andlibsql_execute()
- Update to fend-core 1.5
0.5.9
- Add
mkpass()
function - Add
wechat
,id
,plate
,zipcode
,creditcard
forfake()
function