Amruta, you could use the shell to do this quite easily:
field14, field15: hold the 14th and 15th fields, rest_of_the_fields: holds the fields from 17 to end of line. Everything else goes into the appropriately named variables.
I have written a script for converting an IP address into its corresponding AS number in PHP. But based on the timing analysis, I've observed that it takes a long time to process large number of entries. So I need to do something directly in unix. What method would one suggest for this purpose?
... (8 Replies)
Hi All,
I am using Unix ksh script.
I need to insert values to a table using the o/p from a slelect statement.
Can anybody Help!
My script looks like tihs.
---`sqlplus -s username/password@SID << EOF
set heading off
set feedback off
set pages 0
insert into ${TB_NAME}_D... (2 Replies)
Hi All
I have a script which runs a piece of JOB. The jobs are in sequence and if it fails at a particular job I wanted it to be started from the point where it failed.
What I did I prepared two properties file one which contains the entire List of the JOBS which are to be executed and the... (5 Replies)
hi,
When i try to run the code below, i get the following error
"ksh: syntax error: `(' unexpected"
i am not able to figure it out. Can anyone help me?
Code: (2 Replies)
I have a form , where i will put the values to a table.
I wrote a insert statement for the same.
Table structure is
ename | character varying(30) |
eadd | character varying(30) |
eid | integer |
sal | integer
In the statements, i don't... (1 Reply)
Hi Guys,
I want to create a shell script that will give me the output below. I want to insert the numbers from the input file to my url addresses below. And from the numbers below, I want to separate the last digit with a period (i.e. from 222222222222 to 22222222222.2). Appreciate any help.... (14 Replies)
Hi Guys,
Can somebody help me in inserting today's DATE format (20110709) in my awk statement. I have a script but its not working.
inputfile.txt:
269,1,0,AAA,430
231,2,0,BBB,430
252,3,0,CCC,430
214,4,0,DDD,430
script.sh
#!/bin/bash
DATE="`date +%Y%m%d`"
cd /var/opt/ (8 Replies)
Hi,
I am new to Shell Scripting, and I need to create nicknames for 600 tables in db2. I have the file names in a text file and i have to pass these table names to a shell script create nicknames in db2. Can some one please help me in this regard. (1 Reply)
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
LEARN ABOUT PHP
mongodbdrivermanager.__construct
MONGODBDRIVERMANAGER.__CONSTRUCT(3) 1 MONGODBDRIVERMANAGER.__CONSTRUCT(3)MongoDBnager::__construct - Create new MongoDB Manager
SYNOPSIS
finalpublic MongoDBDriverManager::__construct (string $uri, [array $options], [array $driverOptions])
DESCRIPTION
Constructs a new MongoDBDriverManager object with the specified options.
PARAMETERS
o $uri
- A mongodb:// connection URI:
mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
o $options
-Connection string options.
Note
Specifying options via the $options argument will overwrite any options with the same name in the $uri argument.
o $driverOptions
- Any driver-specific options not included in MongoDB connection spec.
ERRORS /EXCEPTIONS
oThrows InvalidArgumentException on argument parsing errors.
oThrows MongoDBDriverRuntimeException if the $uri format is invalid
EXAMPLES
Example #1
MongoDBDriverManager.__construct(3) basic examples
Connecting to standalone MongoDB node
<?php
$manager = new MongoDBDriverManager("mongodb://localhost:27017");
?>
Connecting to a replica set
<?php
$manager = new MongoDBDriverManager("mongodb://rs1.example.com,rs2.example.com/?replicaSet=myReplicaSet");
?>
Connecting to a sharded cluster (i.e. one or more mongos instances)
<?php
$manager = new MongoDBDriverManager("mongodb://mongos1.example.com,mongos2.example.com/");
?>
Connecting to MongoDB with authentication credentials for a particular user and database.
<?php
$manager = new MongoDBDriverManager("mongodb://myusername:mypassword@localhost:27017/mydatabase");
?>
SEE ALSO
MongoDBDriverServer::__construct, "Chapter#2 Connecting to MongoDB", Connection string URI format.
PHP Documentation Group MONGODBDRIVERMANAGER.__CONSTRUCT(3)