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
Access Awk Variables Outside Scope Amruta Pitkar Shell Programming and Scripting 7 01-15-2008 05:17 AM
How to access variables across scripts javaDev Shell Programming and Scripting 1 08-13-2007 01:47 AM
Access Awk Variables Outside Scope Amruta Pitkar UNIX for Advanced & Expert Users 2 10-26-2006 06:35 PM
How to access the C program variables in shell script bhakti Shell Programming and Scripting 3 07-12-2006 10:41 PM
Read variables from Access table Sn33R UNIX for Dummies Questions & Answers 2 09-24-2003 10:01 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-10-2008
Registered User
 

Join Date: Jun 2008
Posts: 12
Access variables from profile file

Hi all,

I hav created one profile file in which i have declared some variables
i want to knw how can i access these variables into my xyz.ksh file when i am trying to do " echo $variablename " its giving me an empty line i have done export variable also in the profile file.

Thanks in advance..
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-10-2008
Moderator
 

Join Date: Feb 2007
Posts: 1,667
Run the profile script in the current shell:

Code:
. yourscript
Regards
Reply With Quote
  #3 (permalink)  
Old 06-10-2008
Registered User
 

Join Date: Jun 2008
Posts: 12
I have run the profile file using ". . profile " i am still not able to echo all the variables.
Reply With Quote
  #4 (permalink)  
Old 06-10-2008
Registered User
 

Join Date: Apr 2008
Location: Bangalore
Posts: 120
Hi navi,

Run as

. .profile ( No space netween second dot and profile)

Thanks
Penchal
Reply With Quote
  #5 (permalink)  
Old 06-10-2008
Registered User
 

Join Date: Jun 2008
Posts: 12
Hi Guys ,

sorry for that that was a typing mistake i executed the same way as ur sugestin
Reply With Quote
  #6 (permalink)  
Old 06-10-2008
Registered User
 

Join Date: Mar 2008
Location: /bin/sh
Posts: 277
Can you post your .profile file here..?
Reply With Quote
  #7 (permalink)  
Old 06-11-2008
Registered User
 

Join Date: Jun 2008
Posts: 12
Hi All,

Looking for some sugesstions on this i still am not able to access the variables exported through the profile file.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:14 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