MPE/iX Shell and Utilities Reference Manual, Vol 2

typeset(1) MPE/iX Shell and Utilities typeset(1)
NAME
typeset — assign attributes and values to variables
SYNOPSIS
typeset ±f[tux] name name ...
typeset [±lprtuxH][±iLRZ[number]] [variable[=value] ...]
DESCRIPTION
Invoking typeset with no options displays a list of all variables, and their attributes. This
list is sorted by variable name and includes quoting so that it can be re-input to the shell with
the built-in command eval. When only arguments of the form +option are specified,
typeset displays a list of the variables which have all specified attributes set. When only
arguments of the form option are present, typeset displays a list of all the variables hav-
ing all the specified attributes set, and also displays their values.
When the f option is used, typeset applies to functions; otherwise, it applies to variables.
For functions, the only other applicable options are –t, –u and –x.
If the command line contains at least one variable, the attributes of each variable are changed.
In this case, parameters of the form option turn on the associated attributes. Parameters of
the form +option turn off the associated attributes. Parameters of the form variable=value
turn on the associated attributes and also assign value to variable.
When typeset is invoked inside a function, a new instance of each variable is created. Af-
ter the function terminates, each variable is restored to the value and attributes it had before
the function was called.
Options
typeset accepts the following options:
–H performs
POSIX to host-name file mapping.
–i[number]
marks each variable as having an integer value, thus making arithmetic faster. If
number is given and non-zero, the output base of each variable is number.
–l converts uppercase characters to lowercase in any value assigned to a variable. If the
–u option is currently turned on, this option turns it off.
–r makes each variable read-only. See readonly(1).
–t tags each variable. Tags are user-defined, and have no meaning to the shell. For
functions (with the –f option), this turns on the xtraceoption. See set(1) for a
discussion of the xtraceoption.
Commands and Utilities 1-621