![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Invoking Shell Script via php | bubeshj | Shell Programming and Scripting | 2 | 06-30-2006 03:09 AM |
| Invoking shell script from html/jsp page | bubeshj | Shell Programming and Scripting | 2 | 06-28-2006 10:53 AM |
| invoking one shell script from other | ajay xavier | Shell Programming and Scripting | 3 | 05-24-2006 12:39 AM |
| Returning values from child to parent shell | acheepi | Shell Programming and Scripting | 4 | 07-15-2005 12:25 PM |
| Wrong Shell Invoking My Script On Linux | kowrip | Shell Programming and Scripting | 3 | 09-10-2003 07:18 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
returning to the parent shell after invoking a script within a script
Hi everybody,
I have a script in which I'm invoking another script which runs in a subshell. after the script is executed I want to return to the parent shell as some variables are set. However i'm unable to return to my original shell as the script which i'm calling inside is invoked in subshell and as a reason I'm running it in background. (My script is as follows: #!/bin/bash do something sh invoke_another_script.sh do rest.) Please help me with this. |
| Forum Sponsor | ||
|
|
|
|||
|
Try this, maybe you will understand about the problem. Write these two scripts and then execute outer_script.sh
#!/bin/sh # outer_script.sh echo "This is the outer script" sleep 2 echo "now going to execute inner script... " sh inner_script.sh echo "... back in outer script" sleep 2 echo "and going to exit the outer script now" #!/bin/sh # inner_script.sh echo "this is the inner script" sleep 5 echo "going to exit the inner script..." |
|
|||
|
Quote:
|
|||
| Google UNIX.COM |