The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > BSD
Google UNIX.COM



Thread: How to export
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 01-21-2008
jisha jisha is offline
Registered User
 

Join Date: Jan 2008
Location: Bangalore,India
Posts: 135
Hi Vino,
Thanks
Yes . I have done that in a shell script.
The below script got executed successfuly
i have the following in 1.sh
export var1=/<>/<>/<>
export var2=/<>/<>/<>
./2.sh

And i have the following in 2.sh
echo $var1

when i run 1.sh i get the echo run

But wat i wanted was
vi 1.sh
export var1=/<>/<>/<>
export var2=/<>/<>/<>

after i run the above script if i give aecho of var1 then it sholud give me the dir path

But this doesnot work.
It looks like the exporting is available to only the subscripts and once we come out of 1.sh(in the secondcase) the effect of export is lost .

Thanks in advance
Reply With Quote