Hello
I would like to perform a select from a oracle table and return those values to my shell script
For example:
site=head -1 $infile | cut -c1-15 | awk '{printf "s%", $0}
sqlplus -s /nolog |& #Open pipe to sql
select col1, col2, col3, col4
from oracle_table
where col5 =... (6 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)
I am trying to assign an select statement into a variable. Can someone hel me with this.
example :
a='select * from dual'
echo $a should give me select * from dual
But this is not working. I trying with \ before * and quotes too. (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 all, I tried searching for something similiar before posting but couldn't come up with anything that fit what I need.
In Linux, I'm trying to parse through a number of files and take the info in them and put it into mysql. My file is a dump from an expect script:
---filename... (3 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)
Hello,
I am fairly new to shellscripting and have written a script to check on messages file and report failed logins:
Here is the original file:
Jul 17 03:38:07 sfldmilx086 sshd: error: PAM: Authentication failure for houghn97 from 10.135.77.201
Jul 17 03:38:07 sfldmilx086 sshd: error:... (2 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)
Discussion started by: Pratiksha Mehra
8 Replies
LEARN ABOUT DEBIAN
ng_deflate
NG_DEFLATE(4) BSD Kernel Interfaces Manual NG_DEFLATE(4)NAME
ng_deflate -- Deflate PPP compression (RFC 1979) netgraph node type
SYNOPSIS
#include <sys/types.h>
#include <netgraph/ng_deflate.h>
DESCRIPTION
The deflate node type implements the Deflate sub-protocols of the Compression Control Protocol (CCP).
The node has two hooks, comp for compression and decomp for decompression. Only one of them can be connected at the same time, specifying
node's operation mode. Typically that hooks would be connected to the ng_ppp(4) node type hook of the same name. Corresponding ng_ppp(4)
node hook must be switched to NG_PPP_DECOMPRESS_FULL mode to permit sending uncompressed frames.
HOOKS
This node type supports the following hooks:
comp Connection to ng_ppp(4) comp hook. Incoming frames are compressed (if possible) and sent back out the same hook.
decomp Connection to ng_ppp(4) decomp hook. Incoming frames are decompressed (if they are compressed), and sent back out the same hook.
Only one hook can be connected at the same time, specifying node's operation mode.
CONTROL MESSAGES
This node type supports the generic control messages, plus the following:
NGM_DEFLATE_CONFIG (config)
This command resets and configures the node for a session (i.e., for compression or decompression). This command takes a struct
ng_deflate_config as an argument:
struct ng_deflate_config {
u_char enable; /* node enabled */
u_char windowBits; /* log2(Window size) */
};
The enabled field enables traffic flow through the node. The windowBits specify compression windows size as negotiated by the Compres-
sion Control Protocol (CCP) in PPP.
NGM_DEFLATE_RESETREQ (resetreq)
This message contains no arguments, and is bi-directional. If an error is detected during decompression, this message is sent by the
node to the originator of the NGM_DEFLATE_CONFIG message that initiated the session. The receiver should respond by sending a PPP CCP
Reset-Request to the peer.
This message may also be received by this node type when a CCP Reset-Request or Reset-Ack is received by the local PPP entity. The node
will respond by flushing its compression state so the sides can resynchronize.
NGM_DEFLATE_GET_STATS (getstats)
This control message obtains statistics for a given hook. The statistics are returned in struct ng_deflate_stats:
struct ng_deflate_stats {
uint64_t FramesPlain;
uint64_t FramesComp;
uint64_t FramesUncomp;
uint64_t InOctets;
uint64_t OutOctets;
uint64_t Errors;
};
NGM_DEFLATE_CLR_STATS (clrstats)
This control message clears statistics for a given hook.
NGM_DEFLATE_GETCLR_STATS (getclrstats)
This control message obtains and clears statistics for a given hook.
SHUTDOWN
This node shuts down upon receipt of a NGM_SHUTDOWN control message, or when hook have been disconnected.
SEE ALSO netgraph(4), ng_ppp(4), ngctl(8)
J. Woods, PPP Deflate Protocol, RFC 1979.
W. Simpson, The Point-to-Point Protocol (PPP), RFC 1661.
AUTHORS
Alexander Motin <mav@alkar.net>
BUGS
Due to nature of netgraph PPP implementation there are possible race conditions between data packet and ResetAck CCP packet in case of packet
loss. As result, packet loss can produce bigger performance degradation than supposed by protocol.
BSD December 23, 2006 BSD