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 OSX
mpi_status_c2f
MPI_Status_f2c(3OpenMPI) MPI_Status_f2c(3OpenMPI)
NAME
MPI_Status_f2c, MPI_Status_c2f - Translates a C status into a Fortran status, or vice versa.
SYNTAX
C Syntax
#include <mpi.h>
int MPI_Status_f2c(MPI_Fint *f_status, MPI_Status *c_status)
int MPI_Status_c2f(MPI_Status *c_status, MPI_Fint *f_status)
DESCRIPTION
These two procedures are provided in C to convert from a Fortran status (which is an array of integers) to a C status (which is a struc-
ture), and vice versa. The conversion occurs on all the information in status, including that which is hidden. That is, no status informa-
tion is lost in the conversion.
When using MPI_Status_f2c, if f_status is a valid Fortran status, but not the Fortran value of MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE,
then MPI_Status_f2c returns in c_status a valid C status with the same content. If f_status is the Fortran value of MPI_STATUS_IGNORE or
MPI_STATUSES_IGNORE, or if f_status is not a valid Fortran status, then the call is erroneous.
When using MPI_Status_c2f, the opposite conversion is applied. If c_status is MPI_STATUS_IGNORE or MPI_STATUSES_IGNORE, or if c_status is
not a valid C status, then the call is erroneous.
The C status has the same source, tag and error code values as the Fortran status, and returns the same answers when queried for count,
elements, and cancellation. The conversion function may be called with a Fortran status argument that has an undefined error field, in
which case the value of the error field in the C status argument is undefined.
Open MPI 1.2 September 2006 MPI_Status_f2c(3OpenMPI)