• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Quick help with a unix shell script?

I need to set a few environment variables before I run a certain program...how can I write a shell script to do this for me?

I tried to write a bash script that did something like "export MYDIR=/home/dir" but that did not set $MYDIR to what I wanted once the script was run.

please help?
 
the 'export MYVAL=blahblahblah' will set the env variable to that value. you do have to point the $MYVAL variable to the environment variable however, you can't just call the env variable name with a $ sign in front of it. You can do that by doing a $MYVAL = $ENV{'MYVAL'}

...when you do that command the $MYVAL value in your script will be set to the environment variable value that was exported to MYVAL

LET US KNOW if it works or not.
 
Back
Top