mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
22 lines
450 B
Plaintext
22 lines
450 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# readonly
|
|
|
|
> Set read-only shell variables.
|
|
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-readonly>.
|
|
|
|
- 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`
|