LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-28-2008, 09:49 AM   #1
Canis Polaris
LQ Newbie
 
Registered: May 2007
Posts: 15

Rep: Reputation: 0
How to remove a variable


I goofed. I thought the command to add a directory to my PATH was
"set PATH=current_path:new_dir".
This resulted in adding a variable "_".

Unset didn't remove it. Unset only changed it.

I have successfully changed the path as desired, but how can I remove that goofy looking "_" variable?

Thanks,

Gregory
 
Old 08-28-2008, 09:52 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Just do another set PATH= without the "_" and it should update it.
 
Old 08-28-2008, 10:39 AM   #3
Canis Polaris
LQ Newbie
 
Registered: May 2007
Posts: 15

Original Poster
Rep: Reputation: 0
Never mind. Apparently all of my systems have a variable "_". Following is the last five lines from running the set command:

TERM=xterm
UID=0
USER=root
USERNAME=root
_=PATH

And from another system:

TERM=xterm
UID=0
USER=oracle
VORTEX_HOME=/opt/acucorp/800
_=/etc/bashrc

Thanks again,

Gregory
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I remove a variable from PATH melinda_sayang Slackware 17 02-28-2009 12:55 PM
Help: removing a variable substring from a string variable in sh script gnparsons Programming 2 06-04-2008 05:21 PM
How to remove readonly variable? hocheetiong Linux - Newbie 1 04-21-2008 04:04 PM
setting a variable variable in a script... this works, but could it be more elegant? pwc101 Programming 3 08-18-2006 11:23 AM
how to remove PATH variable? greg108 Linux - Newbie 2 08-22-2003 01:55 PM


All times are GMT -5. The time now is 03:52 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