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.
|