Exforsys
+ Reply to Thread
Results 1 to 2 of 2

How to Set

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 shell ...

  1. #1
    cyrus is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    128

    Question How to Set

    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.


  2. #2
    Rahulbatra is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124
    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


Latest Article

Network Security Risk Assessment and Measurement

Read More...