SH-MLOAD(1) General Commands Manual SH-MLOAD(1)

mload, munload - namespace separation for shell modules

load mload

mload name [ path... ]
munload name [ path... ]

Mload is a loadable module for sh (1) that allows the simultaneous use of shell modules with potentially clashing command name spaces. Mload creates a new namespace name and loads each path as a builtin module in the same way as load (see sh (1)). Any commands or substitution builtins defined by the modules are accessible by giving the command and its arguments as arguments to the name command.

Munload unloads a module from the namespace name. If no modules remain in the namespace, name is undefined as a command.

Load mpexpr in a different namespace from expr (see sh-expr (1)):

load expr
mload mp mpexpr
echo ${expr 1 2 +}
echo ${mp expr 2 300 xx}

/appl/cmd/sh/mload.b

sh (1),

Because of the way shell modules are implemented, the namespaces are global across all processes that share an instance of mload.