You can use typeset -r to make variables in a ksh script be read-only. This effectively makes them constants, which can no longer be modified.
For example:
[550]-> pi=3.14159
[551]-> echo $pi
3.14159
[552]-> typeset -r pi
[553]-> pi=45
ksh: pi: is read only
[554]-> echo $pi
3.14159
Wednesday, December 14, 2011
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment