This is a discussion on How to Set within the Linux forums, part of the Operating Systems category; I have written a shell script named as sample.sh and I want to set environment variables for this current ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have written a shell script named as sample.sh and I want to set environment variables for this current shell script. I am struck up with this process. Guide me on how can I set environment variables for my shell script mentioned above.
|
|
|||
|
To set environment variables for your current shell script mentioned above as sample.sh you need to give the command as dot followed by space and sample.sh which will export all environment variables in current shell. The syntax is as below:
. sample.sh |