Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 08-28-2008, 10: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?


Old 08-28-2008, 10:52 AM   #2
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, 11: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:


And from another system:


Thanks again,



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 01:55 PM
Help: removing a variable substring from a string variable in sh script gnparsons Programming 2 06-04-2008 06:21 PM
How to remove readonly variable? hocheetiong Linux - Newbie 1 04-21-2008 05:04 PM
setting a variable variable in a script... this works, but could it be more elegant? pwc101 Programming 3 08-18-2006 12:23 PM
how to remove PATH variable? greg108 Linux - Newbie 2 08-22-2003 02:55 PM > Forums > Linux Forums > Linux - Newbie

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

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