Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 26 Mar 2002 @ 17:10:54 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Unix Question (Teradata related)
 
From:   Andrew Doorey

You can run the scripts in the current shell by putting '. ' (dot space) in front of them.

eg if we create files script1 and script2:

#script1
myvar=first
echo script1:$myvar
. script2
echo script1:$myvar

#script2
echo script2:$myvar
myvar=second
echo script2:$myvar

Then we run script1 and the value in myvar changes:

$ script1
script1:first
script2:first
script2:second
script1:second



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023