Hi,
I m trying to connect oracle database from inside while loop.
I m trying to put the output of sql query in a flat file.
Anyone please help me out.
cat $FILE_NAME | \
while read da_name
do
$ORACLE_HOME/bin/sqlplus -s user_name/password@instance << EOF >> $OUTPUT_FILE
select... (3 Replies)
hi everyone,
I have the following problem: the foreach loop inside rsh doesn'work.
I have tried the for command but it's not recognized. with the foreach command I don't receive any error, but it doesn't really make the cycle, ignoring the foreach and executing 1 time the echo command. Anyone has... (5 Replies)
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Hi all
Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Hi all
I run my program prog.c in the following way :
$ ./prog 1 > output.txt where 1 is a user defined initial value used by the program.
But now I want to run it for many a thousand initial values, 1-1000, and store all the outputs in different files.
Like
$ ./prog 1... (1 Reply)
I have an input file at ./$1.txt
with content of seq numbers like :
1234567890
1234589700
.
.
so on..
I need to take each seq nbr from the input file ,run the query below:
select ackname,seqnbr from event where event_text like '%seqnbr( from the input file)'
and redirect the... (11 Replies)
Learning, stumbling! My progress in shell scripting is slow. Now I have this doubt:
I have the following file (users.txt):
AU0909,on
AU0309,off
AU0209,on
AU0109,off
And this file (userson.txt)
AU0909
AU0209
AU0109
AU0309
I just want to set those users on userson.txt to "off" in... (14 Replies)
I'm taking a unix class and need to countdown to 0 from whatever number the user inputs. I know how to do this with a while or until loop but using the for loop is throwing me off....
I know I can use an if-then statement in my for loop but can I include a while loop in my for loop? (3 Replies)
I have if loop with multiple variable value check in if loop. How can i print only if loop satisfied variable and its value in shell script ? I dont want to check each variable in if loop. That makes my script larger.
if ]
then
echo "Only satisfied variable with value"
... (3 Replies)
Discussion started by: prince1987
3 Replies
LEARN ABOUT PHP
curl_share_setopt
CURL_SHARE_SETOPT(3) 1 CURL_SHARE_SETOPT(3)curl_share_setopt - Set an option for a cURL share handle.SYNOPSIS
bool curl_share_setopt (resource $sh, int $option, string $value)
DESCRIPTION
Sets an option on the given cURL share handle.
PARAMETERS
o $sh
- A cURL share handle returned by curl_share_init(3).
o $option
-
+------------------+--------------------------------------+---+
| Option | | |
| | | |
| | Description | |
| | | |
+------------------+--------------------------------------+---+
| | | |
| CURLSHOPT_SHARE | | |
| | | |
| | Specifies a type of data that | |
| | should be shared. | |
| | | |
| | | |
|CURLSHOPT_UNSHARE | | |
| | | |
| | Specifies a type of data that will | |
| | be no longer shared. | |
| | | |
+------------------+--------------------------------------+---+
o $value
-
+---------------------------+--------------------------------------+---+
| Value | | |
| | | |
| | Description | |
| | | |
+---------------------------+--------------------------------------+---+
| | | |
| CURL_LOCK_DATA_COOKIE | | |
| | | |
| | Shares cookie data. | |
| | | |
| | | |
| CURL_LOCK_DATA_DNS | | |
| | | |
| | Shares DNS cache. Note that when | |
| | you use cURL multi handles, all han- | |
| | dles added to the same multi handle | |
| | will share DNS cache by default. | |
| | | |
| | | |
|CURL_LOCK_DATA_SSL_SESSION | | |
| | | |
| | Shares SSL session IDs, reducing | |
| | the time spent on the SSL handshake | |
| | when reconnecting to the same | |
| | server. Note that SSL session IDs | |
| | are reused within the same handle by | |
| | default. | |
| | | |
+---------------------------+--------------------------------------+---+
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
curl_share_setopt(3) example
This example will create a cURL share handle, add two cURL handles to it, and then run them with cookie data sharing.
<?php
// Create cURL share handle and set it to share cookie data
$sh = curl_share_init();
curl_share_setopt($sh, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
// Initialize the first cURL handle and assign the share handle to it
$ch1 = curl_init("http://example.com/");
curl_setopt($ch1, CURLOPT_SHARE, $sh);
// Execute the first cURL handle
curl_exec($ch1);
// Initialize the second cURL handle and assign the share handle to it
$ch2 = curl_init("http://php.net/");
curl_setopt($ch2, CURLOPT_SHARE, $sh);
// Execute the second cURL handle
// all cookies from $ch1 handle are shared with $ch2 handle
curl_exec($ch2);
// Close the cURL share handle
curl_share_close($sh);
// Close the cURL handles
curl_close($ch1);
curl_close($ch2);
?>
PHP Documentation Group CURL_SHARE_SETOPT(3)