![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Killing all active shells without rebooting | Kesava81 | UNIX for Dummies Questions & Answers | 3 | 06-05-2008 05:39 AM |
| Passing environment variables to parent shells | konndanley | UNIX for Dummies Questions & Answers | 3 | 08-04-2007 06:15 PM |
| forking and killing parent processes | davewilliams20 | UNIX for Dummies Questions & Answers | 0 | 10-17-2005 06:40 AM |
| Version of Shells? | Xplore | Linux | 2 | 08-06-2005 11:41 AM |
| Shells | dino_leix | UNIX for Advanced & Expert Users | 3 | 06-08-2005 07:07 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Killing parent shells from subshells (KSH)
Hi all,
I have a shell script which calls other shell scripts, depending on the input. Within a.sh, I have a command which calls b.sh (ie. ksh b.sh) Normally, we use the exit function to terminate a shell. However, if I choose to call exit from b.sh, I will return to the parent shell who activated the shell (ie. a.sh), rather than to close the application completely. Is there a command that I can use to close all parent shells from b.sh? Thanks in advance. |
|
||||
|
Suppose that I want to allow the user to have a choice between:
1. Terminating the shell completely 2. Or closing the subshell and going back to the previous shell script that called it. How can this be implemented? Is it through the use of using ksh b.sh instead of exec b.sh and then: 1. have a case statement which calls exit from the subshell to go back to previous page. 2. use some signal to kill the whole shell Am I correct to say this? If so, what is the command to be used to implement the signals? Thanks in advance. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|