GNU Info

Info Node: (zsh.info)Positional Parameters

(zsh.info)Positional Parameters


Next: Local Parameters Prev: Array Parameters Up: Parameters
Enter node , (file) or (file)node

Positional Parameters
=====================

The positional parameters provide access to the command-line arguments
of a shell function, shell script, or the shell itself; see Note:
Invocation, and also Note: Functions.  The parameter N, where N is
a number, is the Nth positional parameter.  The parameters *, @ and
argv are arrays containing all the positional parameters; thus
`$argv[N]', etc., is equivalent to simply `$N'.

Positional parameters may be changed after the shell or function starts
by using the set builtin, by assigning to the argv array, or by direct
assignment of the form `N=VALUE' where N is the number of the
positional parameter to be changed.  This also creates (with empty
values) any of the positions from 1 to N that do not already have
values.  Note that, because the positional parameters form an array, an
array assignment of the form `N=(VALUE ...)' is allowed, and has the
effect of shifting all the values at positions greater than N by as
many positions as necessary to accommodate the new values.


automatically generated by info2www version 1.2.2.9