exit from unix


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting exit from unix
# 1  
Old 07-02-2010
exit from unix

Hi All,

How can i exit from "unix"?. Looks silly , but still , i logged in to the unix box , then i did a "su - other user" , then " su - other user" , and i end up in the unix as a some 10th user. If i exist i will come to the previous user/account. I want to exit from unix in a single shot.

Regards
Ravi Sastry P
# 2  
Old 07-02-2010
I can only think in one way. killall gnome-terminal

that will close all terminal windows..

I know it's not the same as exit but it's the only thing I can think about
# 3  
Old 07-02-2010
I don't know of a good way to do that. Even if you kill all the terminals you'd still be leaving the login processes out there which would be a mess to clean out. Exiting each of the user shells you logged into is a much better idea so you don't have stranded processes.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

UNIX Pipe -Exit when there are no bytes to read

Hi All, I'm creating a program which reads millions of bytes from the PIPE and do some processing. As the data is more, the idea is to read the pipe parallely. Sun Solaris 8 See the code below: #!/bin/sh MAXTHREAD=30 awk '{print $1}' metadata.csv > nvpipe & while do ... (3 Replies)
Discussion started by: mr_manii
3 Replies

2. Shell Programming and Scripting

Make expect exit the UNIX script in erreneous condition

Hi, I am writing a menu driven program using shell script. THe script will be collecting data by logging into the other servers and bringing back the data to home server to process it and accordingly issue commands. TO automate commands execution , I am using expect script. However I am not able... (5 Replies)
Discussion started by: ashima jain
5 Replies

3. UNIX for Dummies Questions & Answers

UNIX exit code 11

We have a batch Unix process that runs during the day and it is getting an exit code 11 from Unix. It finishes a sqlplus step and gets the exit code 11 before it starts the next step. This used to happen once a year and now is happening more often (but not every time the process runs). We have... (2 Replies)
Discussion started by: msol
2 Replies

4. Shell Programming and Scripting

How to exit a shell script if a unix command does not return any value for 10 seconds?

Hi, Can anyone help me how to exit a shell script if a unix command inside does not return any value for 10 seconds? The scenarios is like this. I want to login to a application using shell script where the connection string is mentioned.but suppose this connection string is not... (10 Replies)
Discussion started by: arijitsaha
10 Replies

5. Shell Programming and Scripting

Exit code from piping in unix shell script

Hi , I have following code in my shell script : "$TS_BIN/tranfrmr" "${TS_SETTINGS}/tranfrmr_p1.stx" "${TS_LOGS}/tranfrmr_p1.err" | ( "$TS_BIN/cusparse" "${TS_SETTINGS}/cusparse_p2.stx" "${TS_LOGS}/cusparse_p2.err" | ( "$TS_BIN/tsqsort" "${TS_SETTINGS}/srtforpm_p3.stx"... (8 Replies)
Discussion started by: sonu_pal
8 Replies

6. UNIX for Dummies Questions & Answers

Problem in Unix script to exit from Putty

We have a requirement where in the user needs to select a option 4 from the menu and the putty window should be closed.I tried giving exit 0 ;; and this is only exiting from the script menu and showing back the prompt.Is there a way for this. (2 Replies)
Discussion started by: gopalt
2 Replies

7. Shell Programming and Scripting

exit in unix

I am fixing a production issue. I am running out some problems with the exit command. This is how the code was in production if ; then echo 1 > $tmp/b1stat exit 1 else echo 0 > $tmp/b1stat fi I wanted to check for another condition and set a value 3 to the... (3 Replies)
Discussion started by: Muthuraj K
3 Replies

8. Programming

exit status running java classpath in unix shell

I have a java classpath running inside of a unix shell script. During my testing it will error with lines that show an example like this below. java.io.FileNotFoundException error at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:129), ... (2 Replies)
Discussion started by: mmcds
2 Replies

9. UNIX for Dummies Questions & Answers

exit unix, but says running jobs

hi, i give a exit to the system, but it says that i have running jobs... so i do a ps and it displays two lines, one is a -ksh and the other is the ps which i am issuing... then i give a who -uH, find my pts.. then do a grep... still the same..... whats wrong.. (6 Replies)
Discussion started by: yls177
6 Replies

10. Programming

How to find the exit status of last command in Unix?

Hi, I want to find the exit status of the last executed command in C Shell. Tried $? but getting the error Variable syntax...$? does not seem to work in C shell.. is there any other command in C shell to find the exit status of last command? Thanks in advance, raju (1 Reply)
Discussion started by: rajugp1
1 Replies
Login or Register to Ask a Question