Exforsys

Online Training

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


Go Back   Exforsys > Operating Systems > Linux

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-29-2007, 10:32 AM
Senior Member
 
Join Date: Apr 2006
Posts: 153
cyrus is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-02-2007, 01:07 AM
Senior Member
 
Join Date: Apr 2006
Posts: 145
Rahulbatra is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new questions
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:55 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.