Re: bash : how to reset environment variable settings

From: Chris F.A. Johnson (cfajohnson_at_gmail.com)
Date: 03/29/05


Date: 29 Mar 2005 20:15:05 GMT

On Tue, 29 Mar 2005 at 20:07 GMT, clinton__bill@hotmail.com wrote:
>
> Chris F.A. Johnson wrote:
>> On Tue, 29 Mar 2005 at 17:09 GMT, clinton__bill@hotmail.com wrote:
>> > Hi,
>> > Is there any easy way to reset the environment virable settings
> in
>> > bash?
>>
>> Which variables?
>>
>> You can try sourcing /etc/profile and your .bashrc or
>> .bash_profile, or you can put the defaults in a script and source
>> that.
>>
>> > Usually after somewhile the shell goes messy, if I am not working
>> > in GUI mode, it is hard to open a new terminal in order to get a
> clean
>> > environment.
>>
>> What do you mean by "messy"?
>>
>> This sound more like a problem with terminal settings than
>> environment variables. Try these commands; you may need one or
> more
>> of them:
>>
>> tput init
>> tput reset
>> stty sane
>>
>> --
> The problem is like this: I first come to a terminal, do some work and
> source some scripts, s1, s2 and s3, then the viables like PATH,
> LD_LIBRARY_PATH and some user viraibles changed. Now for some reason I
> can not continue, I must go back to the initial point that only .bashrc
> is sourced.

    Either execute (not source) the scripts so that the variables will
    not be affected in the calling shell, or reset any variables those
    scripts change.

-- 
    Chris F.A. Johnson                  http://cfaj.freeshell.org/shell
    ===================================================================
    My code (if any) in this post is copyright 2005, Chris F.A. Johnson
    and may be copied under the terms of the GNU General Public License


Relevant Pages

  • Football for Baseball
    ... 193 Chris Simms ... 199 Rudi Johnson ... 225 Mike Peterson ... Marvin Harrison ...
    (rec.collecting.sport.football)
  • football for baseball
    ... Thing is we only collect cards of a few baseball players ... 193 Chris Simms ... 199 Rudi Johnson ... Marvin Harrison ...
    (rec.collecting.sport.baseball)
  • Re: Interesting list
    ... On 2007-06-13, Chris F.A. Johnson wrote: ... of the top ten ways to irritate your Web site's visitors. ... Pop Ups ...
    (alt.html)
  • Re: sed problem: variables countaining special symbols
    ... Chris F.A. Johnson wrote: ... My script is falling over with a sed problem. ... That's bacause $NPASS contains a slash. ...
    (comp.unix.shell)
  • Re: Mozilla asks stupid questions!!
    ... >> it always has been, then Moz says can't start, profile is in use. ... My code in this post is copyright 2004, Chris F.A. Johnson ...
    (comp.os.linux.misc)