O'Reilly logo

Korn Shell: Unix and Linux Programming Manual, Third Edition, The by Anatole Olczak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ;.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required