gri6507 has asked for the wisdom of the Perl Monks concerning the following question:
I didn't see any references to this seemingly trivial task anywhere within these gates, so I figure I'll ask. My $PATH environment variable became exceedingly long (after being modified in various scripts that are sourced at start of a new terminal). So, I figured that it would be easier to write a single perl script to clean this up rather than tracking every sourced file and cleaning the $PATH up by hand.
The script is done, but how do I set the terminal environment $PATH from within the script? If I just set $ENV{PATH}, that change goes away with termination of the script. There do not seem to be any "export" or "setenv" commands in perl.
btw, my shell is bash.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Script to change $ENV{PATH}
by VSarkiss (Monsignor) on May 07, 2003 at 18:52 UTC | |
|
Re: Script to change $ENV{PATH}
by Zaxo (Archbishop) on May 07, 2003 at 22:57 UTC | |
|
Re: Script to change $ENV{PATH}
by TheHobbit (Pilgrim) on May 08, 2003 at 09:47 UTC | |
by TheHobbit (Pilgrim) on May 08, 2003 at 10:02 UTC | |
|
Re: Script to change $ENV{PATH}
by gri6507 (Deacon) on May 07, 2003 at 19:04 UTC |