Hi,
I have a file called /bb/bin/rstrt.
I need to move the line/entry "ccpm_load_shared_memory" after the entry
"initcorp". The problem is that there are several entries for "initcorp" in this file and I need the entry to be moved only after the first instance of "initcorp"
Is there a way... (5 Replies)
Can somebody help me with a script ....
Read a file /etc/inittab
find the string starting with rcml and move it entirely towards the end of file.
rcml:2:once:/usr/sni/aix52/rc.ml > /dev/console 2>&1
I basically want to change the startup sequence. (2 Replies)
Hi,
How can i move to particular line and to a particular position in a file using unix commands ?
eg: in the line 30 and position 10 i want to print my name in a file.
Cheers,
Mohan (1 Reply)
I have parsed a curl download with sed commands. I would also like to move the last line in the output file to the top. Can I use sed for this? (3 Replies)
My current output is as follows:
All Day Event
Someone's Birthday
Class 7:00 PM
Pick up dry cleaning 1:00 PM
Wake up 8:00 AM
I'd like the output to remain the same but have the times moved to the beginning of the line with a hyphen after it so it would look like,
All Day Event... (3 Replies)
I have the following text format in a file which lists the question first and then 5 choices
after that the explanantion and finally the answer.
1.The amount of time it takes for most of a worker’s occupational knowledge and skills to become
obsolete has been declining because of the... (2 Replies)
So say I have the file:
john
london
24
male
========
jane
london
22
female
========
mike
23
========
Bob
how do i get the information i need on one line as such: (5 Replies)
I have menu option in my script and in that i have 4 options like below :-
echo "Please select a target server .."
echo " AIX - AIX1"
echo " AIX - AIX2"
echo " AIX - AIX3"
echo " HP-UX - HP-UX1"
echo "Enter your menu choice : \n"
read tgtser
... (8 Replies)
Hi,
I have a following file and it has only one occurrence of line that says "Output view:". It could be in middle somewhere ( i don't know the exact location ). I want to move it as the first line of the file.
Input
AAA
BBBB
CCCC
Output view:
XXXX
YYYY
ZZZZ
Output should be:
Output... (13 Replies)
Discussion started by: jakSun8
13 Replies
LEARN ABOUT PHP
cubrid_lob2_read
CUBRID_LOB2_READ(3) 1 CUBRID_LOB2_READ(3)cubrid_lob2_read - Read from BLOB/CLOB data.
SYNOPSIS
string cubrid_lob2_read (resource $lob_identifier, int $len)
DESCRIPTION
The cubrid_lob2_read(3) function reads $len bytes from the LOB data and returns the bytes read.
PARAMETERS
o $lob_identifier
-Lob identifier as a result of cubrid_lob2_new(3) or get from the result set.
o $len
-Length from buffer you want to read from the lob data.
RETURN VALUES
Returns the contents as a string.
FALSE when there is no more data.
NULL on failure.
EXAMPLES
Example #1
cubrid_lob2_read(3) example 1
<?php
// test_lob (id INT, contents CLOB)
$conn = cubrid_connect("localhost", 33000, "demodb", "public", "");
$req = cubrid_execute($conn, "select * from test_lob");
$row = cubrid_fetch_row($req, CUBRID_LOB);
print "position now is " . cubrid_lob2_tell($row[1]) . "
";
cubrid_lob2_seek($row[1], 10, CUBRID_CURSOR_FIRST);
print "
position after moving farword is " . cubrid_lob2_tell($row[1]) . "
";
$data = cubrid_lob2_read($row[1], 12);
print "
position after reading is " . cubrid_lob2_tell($row[1]) . "
";
print $data . "
";
cubrid_lob2_seek($row[1], 5, CUBRID_CURSOR_CURRENT);
print "
position after moving again is " . cubrid_lob2_tell($row[1]) . "
";
$data = cubrid_lob2_read($row[1], 20);
print $data . "
";
cubrid_disconnect($conn);
?>
Example #2
cubrid_lob2_read(3) example 2
<?php
// test_lob (id INT, contents CLOB)
$conn = cubrid_connect("localhost", 33000, "demodb", "dba", "");
$req = cubrid_execute($conn, "select * from test_lob");
$row = cubrid_fetch_row($req, CUBRID_LOB);
while (true) {
if ($data = cubrid_lob2_read($row[1], 1024)) {
print $data . "
";
}
elseif ($data === false) {
print "There is no more data
";
break;
}
else {
print "There must some errors
";
break;
}
}
cubrid_disconnect($conn);
?>
SEE ALSO cubrid_lob2_write(3), cubrid_lob2_seek(3), cubrid_lob2_seek64(3), cubrid_lob2_tell(3), cubrid_lob2_tell64(3), cubrid_lob2_size(3),
cubrid_lob2_size64(3).
PHP Documentation Group CUBRID_LOB2_READ(3)