LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-17-2003, 06:59 PM   #1
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
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.
 
Old 05-19-2003, 07:20 AM   #2
vladkrack
Member
 
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334

Rep: Reputation: 30
It's not possible to unset this var, only restarting bash ...
 
Old 05-19-2003, 06:13 PM   #3
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
Oh really? Thanks for telling me. Couldn't track that down too easily.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to unset environment variable in bash suneel Linux - Newbie 7 09-14-2009 11:17 AM
BASH variables getting unset outside of loop trevelluk Programming 2 03-25-2005 08:14 AM
Unset praveenv Linux - Newbie 1 09-14-2004 06:37 PM
how to unset cflags? shanenin Linux - Software 4 01-25-2004 10:36 PM
Set/Unset Non-Blocking sockets? zer0python Programming 2 01-04-2004 02:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration