Sponsored Content
Top Forums Shell Programming and Scripting Problem in quitting/exiting from sqlplus Post 302692915 by vbe on Tuesday 28th of August 2012 08:31:04 AM
Old 08-28-2012
What do you mean by second if doesnt work? You espect a value greater than zero and you get 0?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

KSH Sqlplus problem

Hi, trying this =============================== Temp=`sqlplus -s user/passwd <<EOF WHENEVER SQLERROR EXIT 1 set serverout on set feedback off set heading off select nam from tabel1 where x=y; EOF` echo Temp>>$logfile ================================= The select statement is... (2 Replies)
Discussion started by: amitkr
2 Replies

2. UNIX for Advanced & Expert Users

Problem while calling Oracle 10g SQLPLUS files

Hi all, Iam facing a lot of problem while calling Oracle 10g SQLPLUS files from shell. What is the standard procedures to be taken care. Any help would be useful for me. Thanks in advance, Ganapati. (2 Replies)
Discussion started by: ganapati
2 Replies

3. Solaris

Emacs changes the term colors after quitting

Ok. So I've finally compiled the latest version of GNU emacs on Solaris 5.8. I've set putty up so that it sets TERM=xtermc. emacs now has syntax highlighting. The problem is, whenever I quit emacs, it changes the screen colors. The background is now the same as the color of the minibuffer. It... (1 Reply)
Discussion started by: m9dhatter
1 Replies

4. Shell Programming and Scripting

Problem in exiting a loop

Hi my code looks like: if test $STEP -le 10 then . . ls -1d AM*-OUT|while read MYDIR do cd $MYDIR ls |tail -n1| while read MYFILE do . . if test -s $MYFILE then sqlldr .... rc=$? if test $rc -ne 0 (3 Replies)
Discussion started by: anijan
3 Replies

5. Shell Programming and Scripting

Quitting from a script, either sourced or not

This is a very simple problem, I am wondering why I can find no answer anywhere... I have a script that can be run either sourced or not. This script has some place where it needs to quit execution (e.g., when an error is found) If I "exit", the sourced call would exit the parent shell, but... (7 Replies)
Discussion started by: MadMage
7 Replies

6. Shell Programming and Scripting

Quitting a bash script... any alternatives to exit?

Folks, Below is a basic synopsis of the problem. I have a script that I need to check for some env vars and fail (exit the script) if they are not there. At the same time I need to set some default env vars. To do this I must run the script from the parent shell or source the script. Doing... (3 Replies)
Discussion started by: bashN00b
3 Replies

7. Shell Programming and Scripting

problem in quitting from sqlplus

Hi all, I have a scenario where im connecting to sqlplus executing a query,redirecting the output to a file and manipulating the file MY CODE IS AS FOLLOWS sqlplus -s /nolog << EOF > $UTILITIES_HOME/temp/analyze.temp.log & set linesize 3000 set trimspool on set pagesize... (2 Replies)
Discussion started by: niteesh_!7
2 Replies

8. Shell Programming and Scripting

SQLplus and Shell script problem

sql_rows=`sqlplus -s / <<EOF set heading off set pagesize 1000 set tab off set linesize 120 wrap off column "Path" format a15 --column "No_Of_files" format a10 select tablespace_name, substr(file_name,1,instr(file_name,'/',1,2)) as "Path" , count(*) as "No_Of_files" from dba_data_files ... (7 Replies)
Discussion started by: desibabu
7 Replies

9. AIX

SQLPLUS problem

Hi guys, Here is the error i get by running a "sqlplus -v" after installing an oracle client 10.2.0.5 on an AIX 5.3.9 server. Could not load program sqlplus: Symbol resolution failed for sqlplus because: Symbol __pthread (number 307) is not exported from dependent ... (3 Replies)
Discussion started by: Chapel
3 Replies

10. Shell Programming and Scripting

Problem exiting a WHILE loop in ksh

Hi I am having a problem exiting a WHILE loop. I am on a Sun server using ksh. I am running a Veritas Cluster Software (High Availablity) command to obtain a group status and grepping the command output for status "G" which means that the filesystem is frozen and therefore not available to... (3 Replies)
Discussion started by: bigbuk
3 Replies
thr_exit(3C)						   Standard C Library Functions 					      thr_exit(3C)

NAME
thr_exit - terminate the calling thread SYNOPSIS
cc -mt [ flag... ] file...[ library... ] #include <thread.h> void thr_exit(void *status); DESCRIPTION
The thr_exit() function terminates the calling thread, in a similar way that exit(3C) terminates the calling process. If the calling thread is not detached, then the thread's ID and the exit status specified by status are retained. The value status is then made available to any successful join with the terminating thread (see thr_join(3C)); otherwise, status is disregarded allowing the thread's ID to be reclaimed immediately. Any cancellation cleanup handlers that have been pushed and not yet popped are popped in the reverse order that they were pushed and then executed. After all cancellation cleanup handlers have been executed, if the thread has any thread-specific data, appropriate destructor functions will be called in an unspecified order. Thread termination does not release any application visible process resources, including, but not limited to, mutexes and file descriptors, nor does it perform any process level cleanup actions, including, but not limited to, calling any atexit() routines that might exist. An exiting thread runs with all signals blocked. All thread termination functions, including cancellation cleanup handlers and thread-spe- cific data destructor functions, are called with all signals blocked. If any thread, including the main() thread, calls thr_exit(), only that thread will exit. If main() returns or exits (either implicitly or explicitly), or any thread explicitly calls exit(), the entire process will exit. The behavior of thr_exit() is undefined if called from a cancellation cleanup handler or destructor function that was invoked as a result of either an implicit or explicit call to thr_exit(). After a thread has terminated, the result of access to local (auto) variables of the thread is undefined. Thus, references to local vari- ables of the exiting thread should not be used for the thr_exit() status parameter value. If any thread (except the main() thread) implicitly or explicitly returns, the result is the same as if the thread called thr_exit() and it will return the value of status as the exit code. The process will terminate with an exit status of 0 after the last non-daemon thread has terminated (including the main() thread). This behavior is the same as if the application had called exit() with a 0 argument at thread termination time. RETURN VALUES
The thr_exit() function cannot return to its caller. ERRORS
No errors are defined. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
exit(3C), thr_create(3C), thr_join(3C), thr_keycreate(3C), attributes(5), standards(5) NOTES
Although only POSIX implements cancellation, cancellation can be used with Solaris threads, due to their interoperability. The status argument should not reference any variables local to the calling thread. SunOS 5.11 2 Nov 2007 thr_exit(3C)
All times are GMT -4. The time now is 09:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy