This is an old revision of the document!


The readonly builtin command

readonly [-p] [-a] [-A] [-f] [NAME[=VALUE] ...]

The readonly builtin command is used to mark variables or functions as read-only, which means unchangable. Tis implies that it can't be unset anymore.

Options

Option Description
-a refer to normal arrays
-A refer to associative arrays
-f refer to functions
-p print all read-only variables or functions, -a, -A and -f can be used to filter. The output is reusable as input

An argument of -- disables further option processing.

Return status

The return status is 0 unless an invalid option or an invalid combination of options is given or a NAME is invalid.

  • in POSIX┬«, only the -p option is specified
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
You could leave a comment if you were logged in.
  • commands/builtin/readonly.1294120485.txt
  • Last modified: 2011/01/04 05:54
  • by thebonsai