typeset

Official Description

Sets attributes and values for shell parameters.

Syntax

typeset [+ | -HLRZfilprtux[n]] [name[=value ...]]

Options

-f sets up a function.

-i sets up a shell variable as an integer.

-l requests that contents be stored in lowercase only.

-L requests that contents be left justified.

-p requests that all variables be printed (displayed).

-r sets a variable's characteristics to read-only.

-R requests that contents be right justified.

-u requests that contents be stored in uppercase only.

-x makes the shell variable an environment variable (marked for export).

-Z requests that contents be right justified and that any leading spaces be filled with zeroes.

Oddities

Using + (plus sign) rather than - (hyphen) causes these ...

Get Korn Shell Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.