1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-24 22:15:26 +02:00

readonly: add page (#10786)

* readonly: add page

* Update readonly.md

* Update readonly.md

* Update pages/common/readonly.md

Co-authored-by: Reinhart Previano Koentjoro <reinhart_previano@yahoo.com>

* Update readonly.md

* Update pages/common/readonly.md

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>

* Update pages/common/readonly.md

* Update pages/common/readonly.md

* Update pages/common/readonly.md

---------

Co-authored-by: Reinhart Previano Koentjoro <reinhart_previano@yahoo.com>
Co-authored-by: Jack Lin <blueskyson1401@gmail.com>
This commit is contained in:
parthzz 2023-10-02 10:24:14 +05:30 committed by GitHub
parent ab351d458c
commit 768f6203d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

17
pages/common/readonly.md Normal file
View file

@ -0,0 +1,17 @@
# readonly
> Create or modify read-only variables within a shell script, preventing the variable from being changed by subsequent commands.
> This is useful when you want to ensure that a variable retains a constant value throughout the execution of a script.
> More information: <https://manned.org/readonly.1p>.
- Create a read-only variable:
`readonly {{variable_name}}={{value}}`
- Mark a variable as read-only:
`readonly {{existing_variable}}`
- [p]rint to the standard output the names and values of all read-only variables:
`readonly -p`