Hi,
I want to use the following ps coomand:
ps -ef | grep test
Result of this command is:
Test 161220 1 0 Oct 04 - 1:11 /test/test
Just mentioning the description of each value in the result:
UID PID PPID C STIME TTY TIME CMD
Test 161220... (11 Replies)
Hi,
In a kshell , i need to compare the results of two array .
each Non-match value should copy to a new array.
For example:
==========
Array one contain the following values:
A
B
C
Array two contain the following values:
C
F
A
E
After comparing this arrays , a new array should... (4 Replies)
I am looking to search a directory for a folder or file and when it finds any hits I want it to store those hits in an array so I can work with those hits later on.
I have been trying to do something like this but it isn't putting results into an array like I would like, is it syntax or is this... (8 Replies)
I'm trying to add the paths of all the xml files in certain directories to an array. I want to use the array later in my code. Anyway, for some reason this isn't working. Any help would be appreciated.
Path_Counter=0
for result in "find * -name '*.xml'"; do
XmlPath="$result"
echo... (2 Replies)
Hi Experts,
I am very much new to linux scripting, I am currently working on reducing my manual work and hence writing a script to automate few task.
I am running below command to snmpwalk the router..
snmpwalk -v 3 -u WANDL_SU -a MD5 -A vfipmpls -x DES -X VfIpMpLs -l authPriv... (19 Replies)
Sorry folks, Second time today.
I am working on a script that accepts data via pipe and processes it.
I expect it to work as:
# command | ProcScript.sh
Within ProcScript.sh, I want to be able to give the target of the prev run command
I am using history 2 | grep -v history | awk... (18 Replies)
below is the output xml string from some other command and i will be parsing it using awk
cat /tmp/alerts.xml
<Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Requirement 1) I need to execute 15 SQL queries in oracle through linux script. All these query results needs to be stored in array variables.
Requirement 2) And these 15 queries needs to be executed in parallel.
Requirement 3) Once all the queries executed then the shell script should... (3 Replies)
for a in {1..100}
do
awk '{ sum+=$a} END {print sum}' a=$a file1 > file2
done
I know I will get only one number if following the code above, how can I get 100 sum numbers in file2? (2 Replies)
Can C add its results into an array like bash? For example using bash:
cat /etc/passwd
**truncated for space **
gdm:x:109:118:Gnome Display Manager:/var/lib/gdm:/bin/false
mysql:x:110:122:MySQL Server,,,:/nonexistent:/bin/false
statd:x:111:65534::/var/lib/nfs:/bin/false... (5 Replies)
Discussion started by: metallica1973
5 Replies
LEARN ABOUT PHP
mongocommandcursor.rewind
MONGOCOMMANDCURSOR.REWIND(3) 1 MONGOCOMMANDCURSOR.REWIND(3)MongoCommandCursor::rewind - Executes the command and resets the cursor to the start of the result set
SYNOPSIS
public array MongoCommandCursor::rewind (void )
DESCRIPTION
If the cursor has already started iteration, the command will be re-executed.
PARAMETERS
This function has no parameters.
RETURN VALUES
The raw server result document.
ERRORS /EXCEPTIONS
Throws MongoConnectionException if it cannot reach the database and MongoCursorTimeoutException if the timeout is exceeded.
Throws MongoCursorException if the cursor was created with MongoCommandCursor.createFromDocument(3) and has already started iteration.
Such cursors cannot be iterated multiple times, as they lack the original command necessary for re-execution.
EXAMPLES
Example #1
MongoCommandCursor.rewind(3)
<?php
$rawResult = $commandCursor->rewind();
// Command cursor is now reset to the start of the result set
var_dump($rawResult);
?>
The above example will output something similar to:
array(2) {
["cursor"]=>
array(3) {
["id"]=>
object(MongoInt64)#5(1) {
["value"]=>
string(12) "310050110216"
}
["ns"]=>
string(9) "demo.test"
["firstBatch"]=>
array(1) {
[0]=>
array(2) {
["_id"]=>
object(MongoId)#6(1) {
["$id"]=>
string(24) "52f5691544670a8077b0dc51"
}
["value"]=>
string(2) "42"
}
}
}
["ok"]=>
float(1)
}
SEE ALSO
Iterator::rewind.
PHP Documentation Group MONGOCOMMANDCURSOR.REWIND(3)