Hi,
I have a UNIX script which calls SQL Select statement:
Now i want to use the output of that select statement within my UNIX script so as to call different shell script depending upon the output of the select statement.
Can anyone help me in this regard.
TIA
Akhil Goel (4 Replies)
If I recall, when I used informix I could do a sql statement like:
SELECT Value from Table WHERE ID in (100,200,300);
How do I do this in Oracle? I believe I am using Oracle 10 if that matters.
Thanks. (1 Reply)
Hi there
I have a database on a remote box and i have been using shell script to insert data into it for example, i could have a script that did this
SN=123456
n=server1
m=x4140
sql="UPDATE main SET hostname='$n',model='$m' WHERE serial='$SN';"
echo $sql |/usr/sfw/bin/mysql -h... (4 Replies)
hi
I have two tables in oracle DB and am using a joining query which will result in the output as follows.
i need to assign it to a two dimensional array and use it for my further calculations.
the way i tried is as follows.
#!/bin/ksh
export... (1 Reply)
i want to select a variable created and use it in a if statement, but not getting the desired results
LINE='device for 0101a01: lpd://172.25.41.111:515'
prt=`echo $LINE | awk '{print $3 }' | cut -c 1-7`
echo $prt
My if statement to select just what i want..
IFS=$":"
while read prt... (11 Replies)
Hello All,
I am new to shell scripting. I am working on Solaris O/S, bash script and sybase programming.
I want to loop through multiple values in an array and for each value, I
want to select a row from the database.
following is the code written for it.
output="loop.csv" ... (8 Replies)
Hello,
Can anyone tell me that,
How can I assign variable to shell script variable, which i need to use in INSERT INTO statement?
my shell script variables are,
EMPNAME=`regular expression`
EMPID=`regular expression`
EMPBDATE=`regular expression`
Now through ksh script I am... (16 Replies)
Hi
I have run out of ideas as to why this select doesn't work in a script I am writing.
The script sources a file of common functions and I am trying to use a select statement within one of the functions -
PS3="Try? "
select X in CONT EXIT; do
if ]
... (4 Replies)
Hi all,
I'm using below code
processId=`sqlplus -s ${sysuser}/${syspwd} <<CHK_PROCESS
whenever sqlerror exit sql.sqlcode;
set head off feedback off echo off pages 0
SELECT PROCESS_ID FROM LSHADMIN.DATA_DOMAIN WHERE DOMAIN_NAME = '${tabname}'
... (8 Replies)
I have the following script, and I want to assign the output ($10 and $5) from awk to N and L:
grdinfo data.grd | awk '{print $10,$5}'| read N L
output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Discussion started by: geomarine
8 Replies
LEARN ABOUT NETBSD
selnotify
SELECT(9) BSD Kernel Developer's Manual SELECT(9)NAME
seldestroy, selinit, selrecord, selnotify -- select and poll subsystem
SYNOPSIS
#include <sys/param.h>
#include <sys/select.h>
void
seldestroy(struct selinfo *sip);
void
selinit(struct selinfo *sip);
void
selrecord(struct lwp *selector, struct selinfo *sip);
void
selnotify(struct selinfo *sip, int events, long knhint);
DESCRIPTION
selinit() and seldestroy() functions must be used to initialize and destroy the struct selinfo. The seldestroy() function may block.
selrecord() and selnotify() are used by device drivers to coordinate with the kernel implementation of select(2) and poll(2). Each object
that can be polled contains a selinfo record. Device drivers provide locking for the selinfo record.
selrecord() records that the calling thread is interested in events related to a given object. selrecord() should only be called when the
poll routine determines that the object is not ready for I/O: there are no events of interest pending. The check for pending I/O and call to
selrecord() must be atomic. Atomicity can be provided by holding the object's lock across the test and call to selrecord(). For non-MPSAFE
drivers, the global kernel_lock is enough to provide atomicity.
selnotify() is called by the underlying object handling code in order to notify any waiting threads that an event of interest has occurred.
The same lock held across the poll method and call to selrecord() must be held across the call to selnotify(). The lock prevents an event of
interest being signalled while a thread is in the process of recording its interest.
The events indicates which event happen. Zero may be used if unknown.
selnotify() also calls KNOTE() passing knhint as an argument.
CODE REFERENCES
The core of the select and poll subsystem implementation is in sys/kern/sys_select.c. Data structures and function prototypes are located in
sys/sys/select.h, sys/sys/poll.h and sys/sys/selinfo.h.
SEE ALSO poll(2), select(2), knote(9)BSD May 13, 2008 BSD