01-19-2009
Works fine for me...can you post the stack trace.
What platform are you on?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is there any function to concatenate strings in shell script (2 Replies)
Discussion started by: radhika03
2 Replies
2. Shell Programming and Scripting
hey guys..
probably a simple question but i cant seem to find any info on it.
i have a small array of strings, and i want to concatenate the contents of the array into one big string.
any ideas on how i can do this?
cheers. (2 Replies)
Discussion started by: jt_csv
2 Replies
3. Shell Programming and Scripting
I m new to shell scripting and what i want is take as an i/p from command line the name of the file and inside my script i should redirect the o/p of my few commands to this file concatenated with .txt
for example if i give
./linux filename
i should get the o/p in filename.txt
i need to... (2 Replies)
Discussion started by: tulip
2 Replies
4. Shell Programming and Scripting
Hi Friends,
I'm new to shell scripting and trying to concatenate two Strings to create a filepath like string but I'm getting an unexpected result.
here is my code for 'runToneUserLoad.sh':
script_dir="$(dirname $0)"
echo "Script Dir:$script_dir"
dirtest1="/installedUtility"... (6 Replies)
Discussion started by: kuldeept
6 Replies
5. Shell Programming and Scripting
Hi, all,
I tried to write a simple shell script as follow:
#!/bin/bash
# What want to do in bash is following
# : pcd_viewer cloud_cluster_0.pcd cloud_cluster_1.pcd cloud_cluster_2.pcd cloud_cluster_3.pcd cloud_cluster_4.pcd
STR = "pcd_viewer"
for i in `seq 0 4`
do
STR... (1 Reply)
Discussion started by: bedeK
1 Replies
6. Shell Programming and Scripting
hi I am on AIX 5 and i have a script that runs the following command to list processes running. I then want to kill the returned processes. The PID are on field 2 separated by spaces.
$ ps -ef|grep "rams.e $PORT"
lesqa 1826998 2646248 0 11:20:35 pts/2 0:00 grep rams.e
t24cm 2789380 ... (3 Replies)
Discussion started by: dustytina
3 Replies
7. Shell Programming and Scripting
Hi All,
I have written a C program to solve this problem but I am eager to know whether the same output can be obtained using sed or awk?
This is the input:
star
ferry
computer
symbol
prime
time
This is the output:
starferry
ferrycomputer
computersymbol
symbolprime
primetime (7 Replies)
Discussion started by: shoaibjameel123
7 Replies
8. Shell Programming and Scripting
Hi
I'm trying to loop through an array that contains other arrays and these arrays consist of strings with spaces. The problem is that I can't seem to preserve the spacing in the string. The string with spaces are either divided into multiple items if I change IFS to \n or all the elements of... (4 Replies)
Discussion started by: kidmanos
4 Replies
9. Shell Programming and Scripting
Alright, so I'm writing a file for the lexical analyzer (lex). It will be used to check C code (collecting the identifiers and storing those names along with the line numbers the identifier was found on). I'm not used to 'C' so I'm having some difficulty.
I am using a function (insertId()) to... (4 Replies)
Discussion started by: D2K
4 Replies
10. Shell Programming and Scripting
Hello All Unix Users,
I am still new to Unix, however I am eager to learn it..
I have 2 files, some lines have some matching substrings, I would like to concatenate these lines into one lines, leaving other untouched. Here below is an example for that..
File 1 (fasta file):
>292183... (6 Replies)
Discussion started by: Mohamed EL Hadi
6 Replies
LEARN ABOUT PHP
mongocollection.getreadpreference
MONGOCOLLECTION.GETREADPREFERENCE(3) 1 MONGOCOLLECTION.GETREADPREFERENCE(3)
MongoCollection::getReadPreference - Get the read preference for this collection
SYNOPSIS
public array MongoCollection::getReadPreference (void )
DESCRIPTION
PARAMETERS
This function has no parameters.
RETURN VALUES
This function returns an array describing the read preference. The array contains the values type for the string read preference mode (cor-
responding to the MongoClient constants), and tagsets containing a list of all tag set criteria. If no tag sets were specified, tagsets
will not be present in the array.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 1.3.3 | |
| | |
| | The return value has changed to be consistent |
| | with MongoCollection::setReadPreference. The type |
| | value was changed from a number to a string, |
| | type_string was removed, and tagsets now |
| | expresses tags as key/value pairs instead of |
| | colon-delimited strings. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
MongoCollection::getReadPreference return value example
<?php
$m = new MongoClient();
$c = $m->test->users;
$c->setReadPreference(MongoClient::RP_SECONDARY, array(
array('dc' => 'east', 'use' => 'reporting'),
array('dc' => 'west'),
array(),
));
var_dump($c->getReadPreference());
?>
The above example will output:
array(2) {
["type"]=>
string(9) "secondary"
["tagsets"]=>
array(3) {
[0]=>
array(2) {
["dc"]=>
string(4) "east"
["use"]=>
string(9) "reporting"
}
[1]=>
array(1) {
["dc"]=>
string(7) "west"
}
[2]=>
array(0) {
}
}
}
SEE ALSO The read preferences documentation., MongoCollection.setReadPreference(3).
PHP Documentation Group MONGOCOLLECTION.GETREADPREFERENCE(3)