The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
export equivalent command in PERL ammu Shell Programming and Scripting 1 09-17-2007 12:46 PM
typeset and export command difference systemsb UNIX for Dummies Questions & Answers 0 05-16-2006 08:36 AM
UNIX export command - memory space Nomaad UNIX for Advanced & Expert Users 2 04-10-2006 05:49 PM
export command radhika03 UNIX for Dummies Questions & Answers 2 12-16-2005 05:25 AM
using export command sveera Shell Programming and Scripting 4 04-01-2005 08:05 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-20-2007
Registered User
 

Join Date: Nov 2007
Posts: 4
Stumble this Post!
Export command

Hi all,

Want to know what does export command do??
What is its functionality?

And on a shell prompt

$at=1
$ echo $at
1

The variable above is it available to other script???
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 11-20-2007
Read Only
 

Join Date: Jul 2007
Posts: 15
Stumble this Post!
It takes a local variable and makes it global.

Try running a script that calls a function or another script. If the secondary script or function sets a LOCAL variable, it is gone when that function of script returns to the parent. If that variable is exported, it is a GLOBAL variable that will remain.
Reply With Quote
  #3 (permalink)  
Old 11-20-2007
Registered User
 

Join Date: Sep 2007
Posts: 55
Stumble this Post!
Wink

1:-Want to know what does export command do??
What is its functionality?


The Best way to approach .. Go for the man page of "export" and "env" command.

2:- $at=1
$ echo $at
1
The variable above is it available to other script???


NO, It will be only for that terminal/shell. But if you want use that variable into your another scripts. You must have export it.

Thanks
Sanjay
Reply With Quote
  #4 (permalink)  
Old 11-20-2007
Yogesh Sawant's Avatar
Part Time Moderator and Full Time Dad
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 767
Stumble this Post!
this might give you more insight
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
export

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:33 PM.


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

Content Relevant URLs by vBSEO 3.2.0