{{ define "main" }} {{ $install := "/docs/install/" | relURL }}

POSIX shell · z/OS UNIX System Services

>zash

A small, fast shell in the Almquist tradition, written from scratch in C23. Scripts are plain POSIX sh; the shell stays quick on a machine that bills CPU time and copies an address space on every fork().

Build it Source on GitHub
zos: ~/src/zash — 10 000 command substitutions
time dash -c 'i=0; while [ $i -lt 10000 ]; do x=$(echo hi); i=$((i+1)); done'
real    0m4.54s
user    0m2.16s
sys     0m2.86s

time ./zash -c 'i=0; while [ $i -lt 10000 ]; do x=$(echo hi); i=$((i+1)); done'
real    0m0.01s
user    0m0.01s
sys     0m0.00s

Every $( ) starts a process in dash and none in zash. One run on Linux x86-64; make bench repeats each case and checks the answers.

C23 Clang & IBM Open XL ASCII or EBCDIC Linux & z/OS
{{ .Content }}
{{ end }}