Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting variables in Korn Shell

Status
Not open for further replies.

SpiderP

Programmer
Jun 10, 2002
1
BR
Hi, fellows!
I'm not a Korn shell specialist, so I need some help!
I have a file called user.cfg with the contents below:

#User configuration
SECTION_NAME=Special Projects
PROJECT_NAME=Full Search Capabilities - FSC
#

I want to export that variables using a ksh script before I execute a program. This program will use the exported variables. How could I do that?

Thanks for all!
 
You can export the variables using
export SECTION_NAME PROJECT_NAME

To use these user.cfg file in another script you can include it using

. ./user.cfg
# execute your program here


This will read only the local version of the user.cfg and then execute your program
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top