Parameters

Parameters are shell variables; they can be assigned values and their values can be accessed using a parameter substitution. A parameter name is either one of the special single punctuation or digit character parameters described later in this appendix, or a letter followed by zero or more letters or digits (‘_’ counts as a letter). The latter form can be treated as arrays by appending an array index of the form: [expr] where expr is an arithmetic expression. Array indices are currently limited to the range 0 through 1023, inclusive. Parameter substitutions take the form $name, ${name} or ${name[expr]}, where name is a parameter name. If substitution is performed on a parameter (or an array parameter element) that is not set, a null ...

Get Korn Shell: Unix and Linux Programming Manual, Third Edition, The now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.