Computing.Net > Forums > Unix > Exiting the Shell

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Exiting the Shell

Reply to Message Icon

Name: Tom
Date: November 17, 2002 at 22:25:35 Pacific
OS: UNIX
CPU/Ram: 64
Comment:

I'm trying to exit a the shell from a script but cannot get it to work.

I know why it will not exit. The problem being that when you start the script it calls another shell to run the script in. When you get to the exit command it terminates this child process and returns you to your parent process (The $).

One way around this is to execute the script using the dot (.) i.e . [script name].

I have not found any other way to make this work



Sponsored Link
Ads by Google

Response Number 1
Name: Sjako
Date: November 22, 2002 at 16:06:13 Pacific
Reply:

You could try exec:

exec [script name]


0
Reply to Message Icon

Related Posts

See More


scripting with grep calling a script from pl/...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Exiting the Shell

More on non-printable characters www.computing.net/answers/unix/more-on-nonprintable-characters/4670.html

force the script to exit w/0 www.computing.net/answers/unix/force-the-script-to-exit-w0-/4303.html

Exit from sqlplus in a shell script www.computing.net/answers/unix/exit-from-sqlplus-in-a-shell-script/8244.html