10 More Discussions You Might Find Interesting
1. Programming
The standard return code when everything goes right is 0, but what about using any other number something happened? Are there "ranges" depending on the kind of problem you want to express or is totally up to the programmer? (3 Replies)
Discussion started by: Tribe
3 Replies
2. Shell Programming and Scripting
Hi
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.Can anyone help here please (3 Replies)
Discussion started by: ginrkf
3 Replies
3. Shell Programming and Scripting
Hello Everybody,
thanks in advance for spending some time in my problem.
My problem is this:
I want to call a java-Programm out of my shell skript, check if die return code is right, and split the output to the normal output and into a file.
The following code doesn't work right, because in... (2 Replies)
Discussion started by: danifunny
2 Replies
4. Shell Programming and Scripting
Hello,
I'm a shell scripting noob and new to this forum as well. My question is can nested if statements be done with && and || instead and if it can be done can someone provide an example pls.
Thanks in advance for the help (1 Reply)
Discussion started by: zomgshellscript
1 Replies
5. Shell Programming and Scripting
Hi all,
I wrote the following simple shell script to perform addition, subtraction, multiplication and division. In the below program, i am not able to exit from the script
Shell Script
-----------
#!/bin/sh
bgcal() {
cal=""
echo "Enter the Option Number: \c"
read cal
if
then... (3 Replies)
Discussion started by: uxpassion
3 Replies
6. Shell Programming and Scripting
Hi,
I am using /bin/sh. I want to display the stdout and stderr on the terminal as well as save it in a file, so I'm using this command.
gmake all 2>&1 | tee log
But even if gmake fails, it's always giving 0 as exit status, i suppose because of tee.
# false 2>&1 | tee Log
# echo $?
0... (2 Replies)
Discussion started by: anand_bh
2 Replies
7. Shell Programming and Scripting
General Question: If a script calls multiple external programs (external to the script, but still on unix), where do the return codes go? Let's say one of external programs fails, does the entire script fail and send a non-zero return code to the job scheduling software, or is the return code sent... (1 Reply)
Discussion started by: jnanasakti
1 Replies
8. HP-UX
I have the question:
How return the exit code from then assign :
VAR=$(command ) for ex. VAR=$(ls ....)
VAREXIT=$?
echo $VAREXIT
VAREXIT is equal to 0 if the directory exist or not exist. WHI??
if i execute the command direct from line-command , the value of $? is different if... (1 Reply)
Discussion started by: ZINGARO
1 Replies
9. UNIX for Dummies Questions & Answers
Sys: HP-UX 9000
In the calling script how do I 'read' the return/exit value of a called script?:confused:
THX in advance for any assistence.:) (1 Reply)
Discussion started by: vslewis
1 Replies
10. UNIX for Advanced & Expert Users
I have a script which loads data files into Oracle and then moves each file into a 'processed' directory when each file has finished loading.
Last night I found that the script was failing on the mv statement (with a return code 2) and the following message,
mv: cannot access... (1 Reply)
Discussion started by: handak9
1 Replies