LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 05: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, 06: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, 05: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



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 10:17 AM
BASH variables getting unset outside of loop trevelluk Programming 2 03-25-2005 07:14 AM
Unset praveenv Linux - Newbie 1 09-14-2004 05:37 PM
how to unset cflags? shanenin Linux - Software 4 01-25-2004 09:36 PM
Set/Unset Non-Blocking sockets? zer0python Programming 2 01-04-2004 01:31 AM

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

All times are GMT -5. The time now is 12:49 AM.

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
Open Source Consulting | Domain Registration