Is it possible to keep source from an executed script without sourcing it ?
Here is the script install.sh
:
JJJ=bar
When i execute the script like ./install.sh
, after execution, i got the following prompt JJJ
:
user1@localhost% echo $JJJ
When i source the file, like source install.sh
, i got the following value for $FOO
:
user1@localhost% echo $JJJ
bar
For, now all is ok.
But i would like to know if there is a way to set the JJJ value and keep the value of JJJ after script execution, without sourcing the script.
In other words, is a their a way that after ./install.sh
, the following prompts gives :
user1@localhost% echo $JJJ
bar
PS1
, which is where your prompt is defined, and incorporate it in your own which is usually set in yourprofile
. – DopeGhoti Jan 02 '19 at 20:29virtualenv/bin/activate
, you're golden. – l0b0 Jan 03 '19 at 09:32