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.
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_
script - Parse a full line into a script construct.
- set_
last_ exit - Set the exit code of the last executed command.
- set_var
- Set a shell variable.
- unset_
var - Remove a shell variable.