Changing environment variables in a shell script?
Chuk Goodin
chukgoodin at gmail.com
Thu Apr 28 20:03:14 UTC 2005
I'd like to change an environment variable by running a script and then have
it stay changed after the script has stopped running. My script is very
simple:
#!/bin/bash
DISPLAY=opal:1
export DISPLAY
After running it, my DISPLAY variable is unchanged. If I just type the last
two lines (one at a time) into the command prompt, it works. Also, if I
check the DISPLAY variable from within the script, it shows up as what I
want it to be. How do I get it to change my "main" environment variable?
thanks in advance,
--
chuk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050428/b622a2b8/attachment.html>
More information about the ubuntu-users
mailing list