The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Tidy shell script source file meharo Shell Programming and Scripting 1 12-20-2008 10:42 PM
Protect shell script source code jkkstar Shell Programming and Scripting 6 10-06-2008 09:24 AM
Post Shell programming: Question about source a file and read data from the file ccwq Shell Programming and Scripting 3 08-04-2007 11:28 PM
Shell Script to Load data into the database using a .csv file and .ctl file Csmani Shell Programming and Scripting 3 05-24-2006 09:09 AM
Reading file names from a file and executing the relative file from shell script anushilrai Shell Programming and Scripting 4 03-10-2006 05:25 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-04-2009
umakanthly umakanthly is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 3
Hi

I am having a script which sets the application environment. In this script i am sourcing the applications env file, when i am debugging the script i see its executing all the environment values and all the variable values are set properply.

Once this main shell script executes, then all the env variables are set to blank.

How to set the values this values till i logout of the session

I have source the env file as . script.env. it is executing, but the variables are set after the script comes out..
  #2 (permalink)  
Old 01-04-2009
umakanthly umakanthly is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 3
Could anyone please provide any inputs on this
  #3 (permalink)  
Old 01-04-2009
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,184
(Assuming that script.env can be found in the current PATH with . script.env).
Sounds like the script.env needs export statements for each environment variable.

MY_VARIABLE="my_value" ; export MY_VARIABLE
Or in some shells just:
export MY_VARIABLE="my_value"

An example would help.
  #4 (permalink)  
Old 01-04-2009
umakanthly umakanthly is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 3
Hi,

env file has all export statement. The value is also exported in the script. But values are not set after the script execution

umakanth
  #5 (permalink)  
Old 01-04-2009
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,184
Needs an example showing what is in each script (assuming there are two scripts) and how they are executed.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

BB 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 07:27 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0