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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
exporting number into .csv file in text form (no other extra charc) from shell script Deepak_Rastogi Shell Programming and Scripting 5 03-13-2008 01:08 PM
variables in shell viko Shell Programming and Scripting 2 03-03-2008 08:09 PM
difference between AIX shell scripting and Unix shell scripting. haroonec Shell Programming and Scripting 2 04-12-2006 05:12 AM
scripting headache... loops & variables StevePace Shell Programming and Scripting 6 02-06-2006 10:18 PM
server variables in bash scripting basher400 UNIX for Dummies Questions & Answers 6 04-12-2005 04:44 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-08-2005
Registered User
 

Join Date: Apr 2005
Posts: 18
exporting variables (shell scripting)

Hi, i've got an executable shell script, called mysc.sh with this line only:
export DATASIZE=0

i run it from my console (./mysc.sh), and after that in the console i run:
echo $DATASIZE
and nothing prints

what could be the problem???

thanks!!
Reply With Quote
Forum Sponsor
  #2  
Old 05-08-2005
bhargav's Avatar
Registered User
 

Join Date: Sep 2004
Location: USA
Posts: 511
./mysc.sh runs in the new child shell.

you can run the script in the same parent shell by
. mysync.sh or
. ./mysync.sh

then , you can retain those exported in the shell

Last edited by bhargav; 05-08-2005 at 12:53 PM.
Reply With Quote
  #3  
Old 05-08-2005
Registered User
 

Join Date: Apr 2005
Posts: 4
thanks!!!
it worked
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:53 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0