Set variable values and attributes.
Declare variables and give them attributes. If no NAMEs are given,
display the attributes and values of all variables.
Options:
-f
[tab]
restrict action or display to function names and definitions
-F
[tab]
restrict display to function names only (plus line number and
[tab]
source file when debugging)
-g
[tab]
create global variables when used in a shell function; otherwise
[tab]
ignored
-p
[tab]
display the attributes and value of each NAME
Options which set attributes:
-a
[tab]
to make NAMEs indexed arrays (if supported)
-A
[tab]
to make NAMEs associative arrays (if supported)
-i
[tab]
to make NAMEs have the `integer' attribute
-l
[tab]
to convert NAMEs to lower case on assignment
-r
[tab]
to make NAMEs readonly
-t
[tab]
to make NAMEs have the `trace' attribute
-u
[tab]
to convert NAMEs to upper case on assignment
-x
[tab]
to make NAMEs export
Using `+' instead of `-' turns off the given attribute.
Variables with the integer attribute have arithmetic evaluation (see
the `let' command) performed when the variable is assigned a value.
When used in a function, `declare' makes NAMEs local, as with the `local'
command. The `-g' option suppresses this behavior.
Exit Status:
Returns success unless an invalid option is supplied or an error occurs.