READONLY

Mark variables/functions as readonly.

SYNTAX

readonly [-apf] [name] ...

OPTIONS
-f Each name refers to a shell function
-a Each name refers to an array variable
-p Print a list of all readonly names (This is the default)The values of these names may not be changed by subsequent assignment.

The &qt;-p&qt;&qt; option causes output to be displayed in a format that may be reused as input.

The return status is zero unless an invalid option is supplied, one of the name arguments is not a valid shell variable or function name, or the &qt;-f&qt;&qt; option is supplied with a name that is not a shell function.

readonly is a BOURNE shell command and a POSIX &qt;special&qt;&qt; builtin.

Tags: ,