Very simple (sub-POSIX) shell for scripting.
$ENVvariables (read usage only, no assignment)- double-quoted strings (expansion, escapes) and single-quoted strings (neither)
- built-ins:
cdandexit - no branching of any kind (conditionals or loops)
- no pipes (NOTE: this might change)
-e(errexit) and-u(noundef) enabled by default
#!/usr/bin/env 0sh
echo "$ABC" '$ABC' # a comment
exit 1go get -u github.com/sgreben/0shOr download a binary from the releases page, or from the shell:
# Linux
curl -L https://github.com/sgreben/0sh/releases/download/0.0.2/0sh_0.0.2_linux_x86_64.tar.gz | tar xz
# OS X
curl -L https://github.com/sgreben/0sh/releases/download/0.0.2/0sh_0.0.2_osx_x86_64.tar.gz | tar xz
# Windows
curl -LO https://github.com/sgreben/0sh/releases/download/0.0.2/0sh_0.0.2_windows_x86_64.zip
unzip 0sh_0.0.2_windows_x86_64.zip0sh [OPTIONS]
Usage of 0sh:
-c string
run only the given COMMAND
-e exit on error (default true)
-n dry-run
-u error on undefined (default true)
-v verbose
-version
print version and exit