how to set environmental variables for a shell temporarily (ie not via .bashrc)
Hi,
I want to set a few shell variables that I occasionally want to set up.
I dont want them set always.
Thats why I can't put them in .bashrc
thus I want to temporarily
export PATH=/home/mlaks/stable-gtk/local/bin:$PATH
export \
LD_LIBRARY_PATH=/home/mlaks/stable_gtk/local/lib:/home/mlaks/stable_gtk/local/lib/gtk-2.0/2.4.0/engines:/home/mlaks/stable_gtk/local/lib/gtk-2.0/2.4.0/immodules:/home/mlaks/stable_gtk/local/lib/gtk-2.0/2.4.0/loaders:/home/mlaks/stable_gtk/local/lib/pango/1.4.0/modules:/home/mlaks/stable_gtk/local/lib/orbit-2.0:/home/mlaks/stable_gtk/local/lib/bonobo/monikers:
$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/home/mlaks/stable_gtk/local/lib/pkgconfig
Now I can type all three of these lines each time and then it will work,
but I am lazy and I want to just run a single command and change my
environment.
I created a file with these lines,
chmoded 755 the file
(and tried with and without adding
#!/usr/bin/sh
as the first line ) and it did not help.
even if I run it, it only sets the variables within the run shell
it does not source the variables for the father (mother) shell
How can I do this?
Thanks
Mitchekk
Reply to: