LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   unset a readonly variable (https://www.linuxquestions.org/questions/linux-general-1/unset-a-readonly-variable-60361/)

hamster 05-17-2003 05:59 PM

unset a readonly variable
 
This is a simple one. I am following a great bash guide. On handy feature is setting read-only variables, ie:

rx=hello

echo $hello
hello

readonly rx

Now that I can't change rx accidently. Fine, but let's say I now want to make it updatable again. The guide doesn't mention this. Is this possible with eg, "write rx" or something similiar?

unset rx
bash: unset: rx: cannot unset: readonly variable

hamster.

vladkrack 05-19-2003 06:20 AM

It's not possible to unset this var, only restarting bash ...

hamster 05-19-2003 05:13 PM

Oh really? Thanks for telling me. Couldn't track that down too easily.


All times are GMT -5. The time now is 03:22 PM.