{{ 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 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.