{{ define "main" }}
{{ $install := "/docs/install/" | relURL }}
POSIX shell · z/OS UNIX System Services
A small, fast shell in the Almquist tradition, written from scratch in C23.
Scripts are plain POSIX >zash
sh; the shell stays quick on a machine
that bills CPU time and copies an address space on every fork().
time bash -c 'i=0; while [ $i -lt 10000 ]; do x=$(echo hi); i=$((i+1)); done'
real 0m37.12s
user 0m20.32s
sys 0m6.77s
time /bin/sh -c 'i=0; while [ $i -lt 10000 ]; do x=$(echo hi); i=$((i+1)); done'
real 0m12.54s
user 0m3.67s
sys 0m1.22s
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.01s
Every $( ) starts a process in bash and /bin/sh,
and none in zash. One run on z/OS; make bench repeats each
case and checks the answers.