LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   removing one directory in PATH env (https://www.linuxquestions.org/questions/linux-newbie-8/removing-one-directory-in-path-env-251809/)

chunlee 11-06-2004 10:56 AM

removing one directory in PATH env
 
hi there:

i have just learn how to add directory to the existing enviromental variable by doing

PATH=$PATH:/newdirectory

but i can't seem to figure out how to remove a particular directory, can anyone help?

thanks

CHUN

david_ross 11-06-2004 11:07 AM

Just don't add it to the PATH variable or after it has been set just edit the variable to what you like..

chunlee 11-06-2004 07:15 PM

thanks, so to remove a particular directory is to redifine all but the one i want to remove?

CHUN

Tinkster 11-06-2004 07:32 PM

Yep ... why set it first and remove it later? :)

Just wouldn't make sense, would it?


If it's something you need changed once in a
blue moon you could probably
export PATH=`echo $PATH|sed 's/remove_me//'`



Cheers,
Tink

chunlee 11-06-2004 07:50 PM

well, i set it to the wrong directory, that's why;)

CHUN


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