|July 30, 2012, 04:29||
Setting environment variables: bash issue
Join Date: Feb 2012
Posts: 5Rep Power: 5
I would like to automate environment initialization prior to OpenFOAM use.
I wrote the following bash script, but it doesn't work at all. Environment is only set inside script, when it exit the script and goes back to console, nothing changes, no variable has been defined.
Do you know how can I keep environment after script execution ?
Thanks for your help.
|July 30, 2012, 17:12||
Join Date: Mar 2009
Location: Lisbon, Portugal
Blog Entries: 34Rep Power: 84
Greetings Xavier and welcome to the forum!
You should resort to an alias instead, placed in your "~/.bashrc". Example for your case:
alias of211combo='source /opt/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc; cd $FOAM_RUN'
|Thread||Thread Starter||Forum||Replies||Last Post|
|Windows Environment variables- to solve problems in compiling UDF in Fluent||Modest Cat||Fluent UDF and Scheme Programming||37||March 30, 2015 05:25|
|Issue with tcsh vs bash shells||Gary_cfd||OpenFOAM Installation||1||June 21, 2012 17:06|
|CFX11 + Fortran compiler ?||Mohan||CFX||20||March 30, 2011 18:56|
|Setting up Enviromental Variables||hasan_hzl||ANSYS||0||December 5, 2009 05:46|
|FloWorks (Flow Express) Volume Goal Setting Issue||rbigelow||FloEFD, FloWorks & FloTHERM||1||November 16, 2009 02:32|