Is there a way to search an entire file system for the occurance of a string..... other than grep.
I have a large directory structure and I'm not certain that grep <string> */*/*/*... is all that effective - especially as I can't be sure of the number of levels to go down without heaps of... (3 Replies)
Hi folks,
Following a part of opmn.xml file:
<process-type id="OC4J_RiGHTv_PLATOR81" module-id="OC4J">
<environment>
<variable id="LD_LIBRARY_PATH" value="/home/ias/v10.1.2/lib" append="true"/>
<variable id="SHLIB_PATH"... (5 Replies)
Hi All,
I need to search for a string in a file that I've opened and base a decision on the result. The logic is this:
"if the word 'Shared' appears on the first line then
do this on the whole file
else
do this on the whole file
"
The code I currently have isn't working:... (4 Replies)
Hi,
Need to extract a string from one file and search the same in other files.
Ex:
I have file1 of hundred lines with no delimiters not even space.
I have 3 more files.
I should get 1 to 10 characters say substring from each line of file1 and search that string in rest of the files and get... (1 Reply)
I need to search for a specific string in a file and if this string exist I need to replace it with something else. I am not sure how I could do this, using an if statement. (2 Replies)
Hi Guys...
I want to search for each file that contains a particular string.
e.g find . -print | xargs grep -i string_name
Now my issue is the files that I search in are gzipped.
Will I be able to find the string, using the above commands, even if the files are gzipped?
Please... (2 Replies)
Hi
I am trying to search for a certain set of patterns within a file, and then perform other commands based on output.
testfile contents:
password requisite pam_cracklib.so lcredit=-1 ucredit=-1 ocredit=-1
script:
D="dcredit=-1"
if
then
echo $D exists
else
echo $D doesnt... (8 Replies)
Hi
I would like to read a file using perl and search for a string (last entry). Then read that into an array and do further grep
File content for ex:
comp=a,value=30,runtime=12,type=lic
comp=d,value=15,runtime=2,type=lic
comp=a,value=90,runtime=43,type=lic... (1 Reply)
I need to design a script which can do the following:
I have two files abc.txt and constant.hmtl
abc.txt contains some 5 string that I need to see if they exist in contants.html.
Constants.hmtl is a very large file around 800 lines.
I want to search all the strings present in file... (8 Replies)
Hello,
I have a file name like FIRST_DPF_DAILY_CUST_0826152322.txt
i need to extract the string after the third "_" underscore upto timestamp ends i.e CUST_0826152322
can anyone help me with the code
Thank you!
Regards
Srikanth Sagi (3 Replies)
Discussion started by: srikanth_sagi
3 Replies
LEARN ABOUT PHP
ovrimos_fetch_row
OVRIMOS_FETCH_ROW(3)OVRIMOS_FETCH_ROW(3)ovrimos_fetch_row - Fetches a row from the result setSYNOPSIS
bool ovrimos_fetch_row (int $result_id, [int $how], [int $row_number])
DESCRIPTION
Fetches a row from the result set. Column values should be retrieved with other calls.
PARAMETERS
o $result_id
- A result identifier, returned by ovrimos_execute(3) or ovrimos_exec(3).
o $how
- Determines how the rows are fetched. This can be one of the following strings (case is not significant):
+---------+---------------------------------------------------+
| Option | |
| | |
| | Notes |
| | |
+---------+---------------------------------------------------+
| | |
| Next | |
| | |
| | Forward direction from current position. This is |
| | the default value. |
| | |
| | |
| Prev | |
| | |
| | Backward direction from current position. |
| | |
| | |
| First | |
| | |
| | Forward direction from the start. |
| | |
| | |
| Last | |
| | |
| | Backward direction from the end. |
| | |
| | |
|Absolute | |
| | |
| | Absolute position from the start. Requires |
| | $rownumber. |
| | |
+---------+---------------------------------------------------+
o $rownumber
- The row number, first one is 0. Only needed when $how is set to Absolute.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
A fetch row example
<?php
$conn = ovrimos_connect("remote.host", "8001", "admin", "password");
if ($conn != 0) {
echo "Connection ok!";
$res=ovrimos_exec($conn, "select table_id, table_name from sys.tables");
if ($res != 0) {
echo "Statement ok!";
if (ovrimos_fetch_row($res, "First")) {
$table_id = ovrimos_result($res, 1);
$table_name = ovrimos_result($res, 2);
echo "table_id=" . $table_id . ", table_name=" . $table_name . "
";
if (ovrimos_fetch_row($res, "Next")) {
$table_id = ovrimos_result($res, "table_id");
$table_name = ovrimos_result($res, "table_name");
echo "table_id=" . $table_id . ", table_name=" . $table_name . "
";
} else {
echo "Next: error
";
}
} else {
echo "First: error
";
}
ovrimos_free_result($res);
}
ovrimos_close($conn);
}
?>
This will fetch a row and print the result.
SEE ALSO ovrimos_fetch_into(3).
PHP Documentation Group OVRIMOS_FETCH_ROW(3)