07-16-2008
You COULD:
until [ $status == 0 ]
do
somecommand someargs
status=$?
done
echo "Exited with status:$status"
but it would loop indefinitely if the command always failed. Would probabally want to put some limit to the number of times to retry.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi folks,
I have the following file (tnsnames.ora):
DB10g =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = buffy)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DB10g)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
... (2 Replies)
Discussion started by: nir_s
2 Replies
2. UNIX for Dummies Questions & Answers
I am trying to send email using the "mail" command. I keep getting an "exec failed. errno=2." message.
Here is one the commands I have tried:
mail test@mycompany.com < test1.out
Any ideas what may be causing this error msg? (1 Reply)
Discussion started by: hawkman2k
1 Replies
3. UNIX for Advanced & Expert Users
In our directory there are too many files, & if I try to execute mv *.gz or rm *.l command it fails, providing error string as - 'arg list too long'. This doesnt happen always, is there any way we know, limit on the rm & mv command so we can take care of this failure in future executions ? (9 Replies)
Discussion started by: videsh77
9 Replies
4. UNIX for Dummies Questions & Answers
hi,
i am trying to run make command in solaris 9.
its giving the error:
make:Fatal error:Command failed for target 'obj/gp_unix.o'
i came to know X11 should be inastalled for gp_unix.o.But it is already installed.still the same error.
./configure worked fine.
can anybody please suggest... (3 Replies)
Discussion started by: rosalina
3 Replies
5. Shell Programming and Scripting
Hi!
I have this situation with 3 shellscripts.
One is a "startscript" that simply calls other scripts. This one is scheduled with cron to run at regular intervals. That script runs what I'll refer to as Script 1.
Script 1 in turn runs script 2 (import_catalogs_buyer.sh)
Sometimes, seemingly... (2 Replies)
Discussion started by: trailsmoke
2 Replies
6. Solaris
I'm trying to build some python modules on a Solaris 10 machine. It has gcc as /usr/sfw/bin/gcc.
# CC=gcc python setup.py build
running build
running build_py
running build_ext
cc -c actread.c -o actread.o
unable to execute cc: No such file or directory
error: command 'cc' failed with exit... (8 Replies)
Discussion started by: aussieos
8 Replies
7. Solaris
How to find & replace bad disks in solaris & VXVM?plz
explain step by step? (2 Replies)
Discussion started by: xtreams
2 Replies
8. Solaris
Hi, I put a for loop in a script to eject backup tapes from the robot. The command echo' output goes to the log file without problem, but command vmchange's output does not go to the log file although it's working fine. It still displays on the screen. I've tried '2>&1 1>$log', but nothing changed.... (5 Replies)
Discussion started by: aixlover
5 Replies
9. Shell Programming and Scripting
hi,
how can i know whether a command inside an sftp script has failed or not?
i have a sftp expect script
#!/usr/bin/expect
spawn /usr/bin/sftp abc@ftp.abc.com
expect "sftp>"
send "cd dir\r"
expect "sftp>"
send "mput abc.txt\r"
expect "sftp>"
send "mput def.xls\r"
expect "sftp>"... (5 Replies)
Discussion started by: Little
5 Replies
10. UNIX for Advanced & Expert Users
Dear Experts,
I am creating a shell script (A) which is menu driven and in turn calls another shell scripts (X) depending on the selection. X has a list of commands which runs batch jobs in auto mode.
Content of X
./sqr.ksh axhri051_sf axhri051_sf.par $1 $2 XHRPPYOV;
./sqr.ksh axbni062... (19 Replies)
Discussion started by: rprasad
19 Replies
LEARN ABOUT OSF1
pthread_exc_get_status_np
pthread_exc_get_status_np(3) Library Functions Manual pthread_exc_get_status_np(3)
NAME
pthread_exc_get_status_np - (Macro) Obtains a system-defined error status from a DECthreads status exception object.
LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so)
SYNOPSIS
#include <pthread_exception.h>
int pthread_exc_get_status_np(
EXCEPTION *exception,
unsigned long *code);
STANDARDS
None
PARAMETERS
DECthreads status exception object whose status code is obtained. Receives the system-specific status code associated with the specified
DECthreads status exception object.
DESCRIPTION
This routine obtains and returns the system-specific status value from the DECthreads status exception object specified in the exception
argument. This value must have already been associated with the exception object using the pthread_exc_set_status_np(3) routine.
In a program that uses DECthreads status exceptions, use this routine within a CATCH, CATCH_ALL, or FINALLY code block to obtain the status
code value associated with a caught exception. Note that any exception objects set to the same status value are considered equivalent by
DECthreads.
RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. If the routine's exception object argu-
ment is a DECthreads status exception, it sets the code argument and return zero (0). Possible return values are as follows: Successful
completion. The exception argument is not a valid DECthreads status exception object.
ERRORS
None
RELATED INFORMATION
Functions: pthread_exc_set_status_np(3)
Manuals: Guide to DECthreads and Programmer's Guide delim off
pthread_exc_get_status_np(3)