could somebody tell me please how to exit a shell script:
if
then
echo "No arguments detected"
exit 1
fi
...
echo "still there" # is displayed .. :-( (4 Replies)
Hi All,
I tried looking for this, but was not able to get a clear answer. Hence posting here. Please find the details below. Thanks for the help
I have 2 shell scripts, script1.sh and script2.sh. I call script2.sh from within script1.sh ( by simple ./script2.sh command).
Based on some... (7 Replies)
I need help in the following script. I want to grep the sql errors insert into the error table and exit the shell script if there is any error, otherwise keep running the scripts.
Here is my script
#!/bin/csh -f
source .orapass
set user = $USER
set pass = $PASS
cd /opt/data/scripts
echo... (2 Replies)
hi guys
I have a script that I need to terminate or exit the shell or session completely for the user but the exit only exit from the script and takes the user to the shell
I found this
https://www.unix.com/unix-dummies-questions-answers/399-using-exit-command-shell-script.html
saying that... (1 Reply)
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)
hi,
i want to pop up an alert box using perl script. my requirement is.
i am using a html page which calls a perl script. this perl script calls a shell script.. after the shell script ends its execution, i am using exit 0 to terminate the shell script successfully and exit 1 to terminate the... (3 Replies)
Hi,
suppose my script is sample.sh
i have to run using '. ./sample.sh'
as . ./script file always executes the script in my parent shell.
when my sample.sh contains exit command .. my environment is getting closed as am executing in the parent shell ...
please suggest me how can i use... (5 Replies)
Discussion started by: pracheth
5 Replies
LEARN ABOUT OSF1
abort
abort(3) Library Functions Manual abort(3)NAME
abort - Generates a software signal to end the current process
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <stdlib.h>
void abort ( void );
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
abort(): ISO C, POSIX.1, XPG4, XPG4-UNIX
Refer to the standards(5) reference page for more information about industry standards and associated tags.
DESCRIPTION
The abort() function sends a SIGABRT signal to the current process. This signal terminates the process unless both of the following condi-
tions are true: (1) signal SIGABRT is being caught, and (2) the signal handler does not do a normal return, for example, if it does a
longjmp.
If abort() causes the process to terminate abnormally and the current directory is writable, the system creates a core file in the current
working directory.
If the call to the abort() function terminates the process, each open stream and message catalog descriptor is affected as if the fclose()
function was called. The abort() function then terminates the process with the same result as the _exit() function, with the exception of
the status value made available to the wait() or waitpid() function. These functions receive the status value of the process terminated by
the SIGABRT signal. The abort() function overrides blocking or ignoring of the SIGABRT signal.
NOTES
The abort() function is supported for multi-threaded applications.
RELATED INFORMATION
Functions: exit(2), kill(2), sigaction(2)
Standards: standards(5) delim off
abort(3)