using a variable in another variable.
my problem is, i have to use some of the variable from one shell script to other shell script.Where the varible is already defined in first script and we just simple use the defined variable in the second script. (like c static and extern variable storage classes)
|
To pass a variable to another script depends on how you invoke or use the other script:
*) if you source (.) a file, all variables are available, as this just reads to contents into the current shell process *) if you call the second script by way of execution, you must pass variables either via exported environment variables or by command line arguments. |
Quote:
|
Code:
$ cat file1 |
All times are GMT -5. The time now is 08:07 PM. |