Export variable
Hi everybody!
I am trying to write a script which will launch some others. But, i want to get a response from the first script that will be executed by the main one, and, after receiving that, launching some other scripts. Is it possible do pass a variable from the main script to another one, and then pass it back and check its value? I am using bash on AIX 4.2 Thanks in advance LooPoo |
Hi,
Sure you can. Take a look at the following two shell scripts: in "shell1" (executable bash shell script) Code:
#! /bin/bash Code:
#! /bin/bash |
Quote:
|
Thanks a lot!
That worked just fine! |
One problem though...
I still have to echo something else in the child script besides this variable that I want to pass back. And when I do this, I recieve in the main script everything that I've echoed in the child script. How can I skip this problem? Thanks, LooPoo |
All times are GMT -5. The time now is 01:41 PM. |