LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-12-2008, 11:27 PM   #1
icecoolcorey
LQ Newbie
 
Registered: Jun 2008
Posts: 19

Rep: Reputation: 0
Post Thank every one. PATHCHANGER sript file Add/Remove directory to path!


with help from pixellany and others here at linuxquestions.org I finished my script. It will add and remove a directory from your path using the /etc/profile. I was going to make it change the path for different users but for now it will for everyone.

chpath.tar.gz

it will work with the bash shell.
I created it on a fedora 8 distribution OS.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
Old 06-13-2008, 01:42 AM   #2
icecoolcorey
LQ Newbie
 
Registered: Jun 2008
Posts: 19

Original Poster
Rep: Reputation: 0
If any of you try it or change it for the better, let us(me) know. I would like to make it more factional, but I have limited knowledge of linux, a(noob). The more advise I get the more work I would do, and the more I will learn.
One concern I have is that it is made to add then remove, not just remove. if for some odd reason you want to remove one of the default directories in your path it will first look for the string like so...
:/directory/:
then
:/directory/
then
/directory/:

I set it up like this because it would add PATH::/directory or leave "::" every time your added then removed a new directory.
It will work if you remove the directory that your added, but I never tested it for just removing one of the default directories.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove directory from $PATH infraredgirl Linux - Newbie 13 03-19-2011 03:22 AM
Add directory to PATH JosephS Slackware 3 05-03-2008 10:17 AM
add a directory to PATH HarryBoy Linux - Newbie 5 05-02-2008 12:39 PM
Can't add directory to the PATH hpladd Linux - Newbie 5 07-25-2006 05:17 PM
remove directory from a users PATH reddazz Linux - General 4 01-14-2005 10:29 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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