Reference notes for Inferno's sh(1)
General
See: http://man.postnix.pw/purgatorio/1/sh
Various files in /lib/sh
Source in: /appl/cmd/sh/
Loadable modules at time of writing:
-
arg
for commandline argument parsing -
csv
for CSV document parsing -
echo
which seems to just provide echo(1) -
expr
for arithmetic -
file2chan
which provides a shell interface for file2chan(2) -
mload
which allows aliasing of modules loaded to avoid module namespace clashes -
mpexpr
same asexpr
exceptmpexpr
uses arbitrary-precision integers -
regex
for regular expressions -
sexprs
for S-expressions -
std
for standard shell functionality (if, for, etc.) -
string
for string manipulation -
test
provides error reporting for itest(1) testing facilities -
tk
as an interface to Tk graphical operations
std
or
lets you try several commands in order, stopping when one succeeds:
or {first} {second} ...
You can do a compound if
without else:
if{~ some $thing}{
do something
}{~ another $thing}{
do anotherthing
}{
other wise
}