05-06-2013
Quote:
Originally Posted by
ginrkf
In one of the script I am seeing some thing like exit 7,exit 1,exit 2,exit 3,exit 9,exit6.What is the difference between all of this exit.
0 means success, any nonzero number means some sort of error. There's no rigid standard for which number means what error, that's up to the program, but returning different numbers allows whatever calls it to tell the different errors apart.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm receiving an exit code 64 in our batch scheduler (BMC product control-m) executing a PERL script on UX-HP. Can you tell me where I can find a list of exit codes and their meaning. I'm assuming the exit code is from the Unix operating system not PERL. (3 Replies)
Discussion started by: jkuchar747
3 Replies
2. Shell Programming and Scripting
Hi all,
I need to redirect stdout and stderr to a file in a ksh shell. That's not a problem. But I need also the correct exit code for the executed command. In the example below I redirect correctly the stdout & stderr to a file, but I have the exit code of tee command and not for the mv... (2 Replies)
Discussion started by: up69
2 Replies
3. Programming
What is the difference between using exit(0) and exit(1) to exit a program? Which should I use? (9 Replies)
Discussion started by: enuenu
9 Replies
4. UNIX for Dummies Questions & Answers
can u tell me what is the meaning of exit(0),exit(1),exit(2)
what is diff amonng these.
Amit (1 Reply)
Discussion started by: amitpansuria
1 Replies
5. Shell Programming and Scripting
I know that the exit codes in scripting "$*" will returns all the parameters/arguments passwd to the script.
But I also know that "$@" will also returns the same. What is the difference between those two ? (1 Reply)
Discussion started by: praveen_b744
1 Replies
6. UNIX for Dummies Questions & Answers
I use a Mac and need to 'echo' a code in >> /etc/hosts
Where is: /etc/hosts?
And how do I do : exit 0 Does : 'fi' mean something too?
:confused:Thanks for any help, Jacqrav:confused: (1 Reply)
Discussion started by: jacqrav
1 Replies
7. Programming
By using exit() and _exit() we can terminate a program. What is the:confused: difference between these two ??? (4 Replies)
Discussion started by: lipun4u
4 Replies
8. UNIX for Dummies Questions & Answers
I have 2 shell scripts the primary one would load the other one which will have functions defined in it.
Script 1:
. /apps/bin/Script 2
function
if
then
continue...
....
fi
Script 2:
function() (10 Replies)
Discussion started by: Ariean
10 Replies
9. Shell Programming and Scripting
Hi All,
I have a requirement where I need to compare 2 files & if the values in the files match, it should proceed, else exit the script without proceeding further.
For e.g : Scenario 1
In this case, the script should exit without proceeding further.
Scenario 2
In this case, the script... (7 Replies)
Discussion started by: dsfreddie
7 Replies
10. Shell Programming and Scripting
Hi All,
I would like to know whether is there any difference in closing the sftp connection with exit, bye and quit.
And would like to know the reliable command. (3 Replies)
Discussion started by: Girish19
3 Replies