Expand description
Minimal shell scripting: variable expansion, if, for, while.
ยงSupported constructs
- Variables:
set VAR=VALUE,$VARexpansion,$?for last exit code. - For loops:
for VAR in A B C ; do COMMAND ; done - While loops:
while COMMAND ; do BODY ; done - If/then:
if COMMAND ; then BODY ; fiorif COMMAND ; then A ; else B ; fi
Enumsยง
- Script
Construct - Script construct types recognized by the parser.
Staticsยง
- LAST_
EXIT ๐ - SHELL_
VARS ๐
Functionsยง
- expand_
vars - Expand
$VARand$?references in a string. - get_var
- Get a shell variable.
- last_
exit - Get the exit code of the last executed command.
- parse_
for_ ๐loop for VAR in A B C ; do cmd1 ; cmd2 ; done- parse_
if_ ๐else if cond ; then body ; [else body ;] fi- parse_
script - Parse a full line into a script construct.
- parse_
while_ ๐loop while cond ; do body ; done- set_
last_ exit - Set the exit code of the last executed command.
- set_var
- Set a shell variable.
- unset_
var - Remove a shell variable.