![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with global and local variables | qzv2jm | Shell Programming and Scripting | 2 | 03-04-2008 10:18 AM |
| Declaring Global Variables in KLD | int80h | BSD | 1 | 01-21-2008 06:11 AM |
| global variables in KLD (FreeBSD) | int80h | High Level Programming | 0 | 01-17-2008 05:14 PM |
| perl global variables | reggiej | Shell Programming and Scripting | 3 | 08-29-2005 05:18 AM |
| declare, assign variables using array, counter, loop | egkumpe | Shell Programming and Scripting | 3 | 08-09-2004 07:56 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to declare global variables for shell script
Hi,
I do have some variables accessed in more than one script. I want to have those variables in a command file anduse them. Something like a header file that we use in C programs. I dont want to set them as environment variables. Is there any other option, like header file in scripting ?? I am using HP-Unix.... |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
The classic approach is to "source" a script file, using "."
eg Code:
. /path/myfilecontainingsomevars.sh |
|
#3
|
|||
|
|||
|
Thanks porter .. its working ...
|
|||
| Google The UNIX and Linux Forums |