John Taber wrote:
I try to set an environment var in a simple script like QTDIR=/usr/local/Qt-323-Win export QTDIR echo $QTDIRwhen I run the script it echos back the correct path but when I go to my konsole and type echo $QTDIR it is not there . However if I type the script commands in the konsole, then it is there. Any explanation for this ? and how I can get a script to work ?
You can achieve "inheritance" of variables by issuing source your_script_fileand not running the script itself (that's because in the latter case a new shell is started to execute your script).