Variable Assignments

One or more variable assignments can start a simple command or can be arguments to the typeset, export, or readonly special built-in commands. The syntax for an assignment is of the form:

varname =word varname [word]=wordNo space is permitted between varname and the = or between = and word.
varname =(assign_list)No space is permitted between varname and the =. An assign_list can be one of the following:
word ...Indexed array assignment.
[word]=word. . .Associative array assignment.
assignment . . .Nested variable assignment.
typeset [options] assignment. . .Nested variable assignment. Multiple assignments can be specified by separating each of them with a ;.

Get Korn Shell: Unix and Linux Programming Manual, Third Edition, The 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.