We tried to terminate a login process from a shell script.
The exit command only quit from the script, not directly logout from
current
login session. Is there any way to accomplish this function?
Thank you very much for your help.
Henry
Shaun Lipscombe wrote:
> try using . under bash, or source to run the script in the current
> shell. Otherwise your script will run in a sub-shell.
>
> henry wrote:
> >
> > Hello,
> >
> > We tried to terminate a login process from a shell script.
> > The exit command only quit from the script, not directly logout from
> > current
> > login session. Is there any way to accomplish this function?
Or you could look into 'kill'.
>Hello,
>
>We tried to terminate a login process from a shell script.
>The exit command only quit from the script, not directly logout from
>current
>login session. Is there any way to accomplish this function?
Don't execute the shell script in a subshell. That is use ".
exit_script" for Bourne-like shells and "source exit_script" for
C-shell.