2025-03-14 21:59:59 -06:00
|
|
|
# readonly
|
|
|
|
|
|
|
|
|
|
> Set read-only shell variables.
|
2025-12-16 10:20:31 -07:00
|
|
|
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-readonly>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Set a read-only variable:
|
|
|
|
|
|
|
|
|
|
`readonly {{variable_name}}={{value}}`
|
|
|
|
|
|
|
|
|
|
- Mark a variable as read-only:
|
|
|
|
|
|
|
|
|
|
`readonly {{existing_variable}}`
|
|
|
|
|
|
|
|
|
|
- [p]rint the names and values of all read-only variables to `stdout`:
|
|
|
|
|
|
|
|
|
|
`readonly -p`
|