Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

User Commands (t - u) typeset(1)
NAME
typeset - Sets attributes and values for shell parameters
SYNOPSIS
typeset [+ | -HLRZlrtux[n]] [name[=value ...]]
FLAGS
-f The names refer to function names rather than parameter names. No assignments can
be made and the only other valid ags are -t, -u, and -x. The -t ag turns on execution
tracing for this function. The -u ag causes this function to be marked undened. The
FPATH variable is searched to nd the function denition when the function is refer-
enced. The -x ags allows the function denition to remain in effect across shell pro-
cedures invoked by name.
-H Provides system-to-hostname
le mapping on machines that restrict the set of charac-
ters in lenames.
-i Parameter is an integer. This makes arithmetic faster. If n is nonzero, it denes the
output arithmetic base; otherwise, the rst assignment determines the output base.
-l All uppercase characters are converted to lowercase. The uppercase -u ag is turned
off.
-L Left justies and removes leading spaces from value.Ifn is nonzero, it denes the
width of the eld; otherwise, it is determined by the width of the value of rst assign-
ment. When the parameter is assigned, it is lled on the right with spaces or truncated,
if necessary, to t into the eld. Leading zeros are removed if the -Z ag is also set.
The -R ag is turned off.
-r The given names are marked read-only, and these names cannot be changed by subse-
quent assignment.
-R Right justies and lls with leading spaces. If n is nonzero, it denes the width of the
eld; otherwise, it is determined by the width of the value of rst assignment. The eld
is left-lled with spaces or truncated from the end if the parameter is reassigned. The
L ag is turned off.
-t Tags the named parameters. Tags are user denable and have no special meaning to
the shell.
-u All lowercase characters are converted to uppercase characters. The lowercase -l ag
is turned off.
-x The given names are marked for export.
-Z Right justies and lls with leading zeros if the rst nonspace character is a digit and
the -L ag was not set. If n is nonzero, it denes the width of the eld; otherwise, it is
determined by the width of the value of rst assignment.
DESCRIPTION
The typeset command assigns values to named parameters. The ags assign attributes to the
parameters.
When the typeset command is invoked inside a function, a new instance of the parameter name
is created. The parameter value and type are restored when the function completes.
Using + (plus sign) rather than - (dash) causes the ags to be turned off.
527188-003 Hewlett-Packard Company 925