Hi There!
My final task for today is to delete lines starting with certain numbers
for e.g., my text block is
and i want to delete all lines starting with 11 or 17 or 21
I know i can use multiple sed commands like
sed '/^11,/d' <filename>
sed '/^17,/d' <filename>
sed '/^21,/d'... (2 Replies)
I am trying to delete key word starting with x in a unix text file.
example, I am trying to delete the words like xaa,xabxbb,xbd and so on....
my input file is some thing like this
xaaa w 1234 5678
rwsd ravi xw123
xbc3 ohrd
want to delete words xaaa,xw123 and xbc3 from the above... (10 Replies)
i have a Oracle table like
col1 col2
---- -----
a 1
b 2
c 3
when i write a script for it , it gives me all the data in one column.
Please give me the solution which gives the exact result like we see in sql editors.
for a in `echo "
set feedback off;
set pagesize 40;... (1 Reply)
i have a file sample.txt containing
i want to delete lines starting with 123 neglecting spaces and tabs.
but not lines containing 123. i.e.
i want files sample.txt as
help me
thanxx (4 Replies)
Platform : RHEL 5.8
I have text file called myapplication.log . In this file, I have around 800 lines which start with the followng three strings
PWRBRKER-3493
PWRBRKER-7834
SCHEDULER-ERROR
How can I delete these lines in one go ? (13 Replies)
I want to burst a report by using the page number value in the report header. Each section starts with *PAGE NO:* 1 Each section might have several pages, but the next section always starts back at 1.
So I want to find the "*PAGE NO:* 1" value and pull all lines that follow until "*PAGE NO:* 1"... (4 Replies)
Hi,
I'm new to Linux. I'm working on a database, and need to load data in a database table (which I already created) using shell script.
The table has two columns - Acct_number (not nullable) and date (timestamp).
I'm not able to write a shell script for that. Can any one help me?
... (3 Replies)
I have written a shell script that calls below sql file. It is not sending the query data in table in the body of email.
spool table_update.html;
SELECT * FROM PROCESS_LOG_STATS where process = 'ActivateSubscription';
spool off;
exit;
Please use code tags next time for your code and data.... (9 Replies)
Hi
I am trying to run sql query from solaris in csh script and send the output to email. Below is my sql query
select p.spid,se.program seprogram, se.machine, se.username, sq.sql_text,sq.retrows from v$process p
inner join v$session se on p.addr = se.paddr
inner join
( select... (2 Replies)
HI Guys,
I have Big XML file with Below Format :-
Input :-
<pokl>MKL=1,FN=1,GBNo=B10C</pokl>
<d>192</d>
<d>315</d>
<d>35</d>
<d>0,7,8</d>
<pokl>MKL=1,dFN=1,GBNo=B11C</pokl>
<d>162</d>
<d>315</d>
<d>35</d>
<d>0,5,6</d>
<pokl>MKL=1,dFN=1,GBNo=B12C</pokl>
<d>188</d> (4 Replies)
Discussion started by: pareshkp
4 Replies
LEARN ABOUT PHP
db2_lob_read
DB2_LOB_READ(3) 1 DB2_LOB_READ(3)db2_lob_read - Gets a user defined size of LOB files with each invocationSYNOPSIS
string db2_lob_read (resource $stmt, int $colnum, int $length)
DESCRIPTION
Use db2_lob_read(3) to iterate through a specified column of a result set and retrieve a user defined size of LOB data.
PARAMETERS
o $stmt
- A valid stmt resource containing LOB data.
o $colnum
- A valid column number in the result set of the stmt resource.
o $length
- The size of the LOB data to be retrieved from the stmt resource.
RETURN VALUES
Returns the amount of data the user specifies. Returns FALSE if the data cannot be retrieved.
EXAMPLES
Example #1
Iterating through different types of data
<?php
/* Database Connection Parameters */
$db = 'SAMPLE';
$username = 'db2inst1';
$password = 'ibmdb2';
/* Obtain Connection Resource */
$conn = db2_connect($db,$username,$password);
if ($conn) {
$drop = 'DROP TABLE clob_stream';
$result = @db2_exec( $conn, $drop );
$create = 'CREATE TABLE clob_stream (id INTEGER, my_clob CLOB)';
$result = db2_exec( $conn, $create );
$variable = "";
$stmt = db2_prepare($conn, "INSERT INTO clob_stream (id,my_clob) VALUES (1, ?)");
$variable = "THIS IS A CLOB TEST. THIS IS A CLOB TEST.";
db2_bind_param($stmt, 1, "variable", DB2_PARAM_IN);
db2_execute($stmt);
$sql = "SELECT id,my_clob FROM clob_stream";
$result = db2_prepare($conn, $sql);
db2_execute($result);
db2_fetch_row($result);
$i = 0;
/* Read LOB data */
while ($data = db2_lob_read($result, 2, 6)) {
echo "Loop $i: $data
";
$i = $i + 1;
}
$drop = 'DROP TABLE blob_stream';
$result = @db2_exec( $conn, $drop );
$create = 'CREATE TABLE blob_stream (id INTEGER, my_blob CLOB)';
$result = db2_exec( $conn, $create );
$variable = "";
$stmt = db2_prepare($conn, "INSERT INTO blob_stream (id,my_blob) VALUES (1, ?)");
$variable = "THIS IS A BLOB TEST. THIS IS A BLOB TEST.";
db2_bind_param($stmt, 1, "variable", DB2_PARAM_IN);
db2_execute($stmt);
$sql = "SELECT id,my_blob FROM blob_stream";
$result = db2_prepare($conn, $sql);
db2_execute($result);
db2_fetch_row($result);
$i = 0;
/* Read LOB data */
while ($data = db2_lob_read($result, 2, 6)) {
echo "Loop $i: $data
";
$i = $i + 1;
}
} else {
echo 'no connection: ' . db2_conn_errormsg();
}
?>
The above example will output:
Loop 0: THIS I
Loop 1: S A CL
Loop 2: OB TES
Loop 3: T. THI
Loop 4: S IS A
Loop 5: CLOB
Loop 6: TEST.
Loop 0: THIS I
Loop 1: S A BL
Loop 2: OB TES
Loop 3: T. THI
Loop 4: S IS A
Loop 5: BLOB
Loop 6: TEST.
SEE ALSO db2_bind_param(3), db2_exec(3), db2_execute(3), db2_fetch_row(3), db2_prepare(3), db2_result(3).
PHP Documentation Group DB2_LOB_READ(3)