I guess you are using "weblogic92" as the parameter to trim the wls_home but I need to trim using "-Dplatform.home" because in other output weblogic92 may change to weblogic103 or something else while "-Dplatform.home" will always remain the same.
i need a shell program to extract a substring from a main string..
for eg:- main string is madhu..
sub string is mad
o/p:- be mad.
try to solve this one (5 Replies)
i need a shell program,to extract a string from a main string.
main string is "madhu"
sub string is "mad"..means any word from the main string
please di this (1 Reply)
Hi, guys. I have one question:
I need to search for a string in a file, and then extract another string from the file and assign it to a variable.
For example:
the contents of the file (group) is below:
...
ftp:x:23:
mail:x:34
...
testing:x:2001
sales:x:2002
development:x:2003
...... (6 Replies)
hi all,
i have a file name using the following pattern:
PREFIX: AR
SOURCE: LEGACY
DATETIME: YYYYMMDD_HH24MISS
SUFFIX: .txt
sample filename:
AR_LEGACY_20101104_105500.txt
i want to extract the source which is LEGACY in this case. how do i do this using shell?
thanks. (4 Replies)
continuing from my previous post, whose link is given below as a reference
https://www.unix.com/shell-programming-scripting/171076-shell-scripting.html#post302573569
consider there is create table commands in a file for eg:
CREATE TABLE `Blahblahblah` (
`id` int(11) NOT NULL... (2 Replies)
Hi,
May i ask if someone share some command for extracting a string between 2 ref string in a txt file
My objective: i had a file with multiple lines and wants only to extract the string "watch?v=IbkAXOmEHpY" or "watch?v=<11 random character>", when i used "grep 'watch?=*' i got a results per... (4 Replies)
I have a string
string="Please have a nice day and sleep well Replace_12123_31233_32134_12342 Good day"
How do i replace "Replace_12123_31233_32134_1234" in the above string.??
Please help.
Regards,
Qwerty (3 Replies)
Need Assistance in shell programming... I have a huge file which has multiple stations and i wanted to search particular station and extract few lines from it and the rest is not needed
Bold letters are the stations . The whole file has multiple stations .
Below example i wanted to search... (4 Replies)
Hi Team
I have an huge xml where i need to search for a ceratin numbers. For example
2014-05-06 15:15:41,498 INFO WebContainer : 10 CommonServicesLogs - CleansingTriggerService.invokeCleansingService Entered PUBSUB NOTIFY MESSAGE () -
<?xml version="1.0" encoding="UTF-8"... (5 Replies)
Hello guys,
I have problem with hpux shell script. I have one big text file that contains like
SOH
bla bla bla
bla bla bla
ETX SOH
bla bla bla
ETX
SOH
bla bla bla
ETX
What I need to do is save first SOH*BLA into file1.txt, save second SOH*BLA into file2.txt and so on.... (17 Replies)
Discussion started by: sembii
17 Replies
LEARN ABOUT DEBIAN
dbix::contextualfetch
DBIx::ContextualFetch(3pm) User Contributed Perl Documentation DBIx::ContextualFetch(3pm)NAME
DBIx::ContextualFetch - Add contextual fetches to DBI
SYNOPSIS
my $dbh = DBI->connect(...., { RootClass => "DBIx::ContextualFetch" });
# Modified statement handle methods.
my $rv = $sth->execute;
my $rv = $sth->execute(@bind_values);
my $rv = $sth->execute(@bind_values, @bind_cols);
# In addition to the normal DBI sth methods...
my $row_ref = $sth->fetch;
my @row = $sth->fetch;
my $row_ref = $sth->fetch_hash;
my %row = $sth->fetch_hash;
my $rows_ref = $sth->fetchall;
my @rows = $sth->fetchall;
my $rows_ref = $sth->fetchall_hash;
my @tbl = $sth->fetchall_hash;
DESCRIPTION
It always struck me odd that DBI didn't take much advantage of Perl's context sensitivity. DBIx::ContextualFetch redefines some of the
various fetch methods to fix this oversight. It also adds a few new methods for convenience (though not necessarily efficiency).
SET-UP
my $dbh = DBIx::ContextualFetch->connect(@info);
my $dbh = DBI->connect(@info, { RootClass => "DBIx::ContextualFetch" });
To use this method, you can either make sure that everywhere you normall call DBI->connect() you either call it on DBIx::ContextualFetch,
or that you pass this as your RootClass. After this DBI will Do The Right Thing and pass all its calls through us.
EXTENSIONS
execute
$rv = $sth->execute;
$rv = $sth->execute(@bind_values);
$rv = $sth->execute(@bind_values, @bind_cols);
execute() is enhanced slightly:
If called with no arguments, or with a simple list, execute() operates normally. When when called with two array references, it performs
the functions of bind_param, execute and bind_columns similar to the following:
$sth->execute(@bind_values);
$sth->bind_columns(undef, @bind_cols);
In addition, execute will accept tainted @bind_values. I can't think of what a malicious user could do with a tainted bind value (in the
general case. Your application may vary.)
Thus a typical idiom would be:
$sth->execute([$this, $that], [($foo, $bar)]);
Of course, this method provides no way of passing bind attributes through to bind_param or bind_columns. If that is necessary, then you
must perform the bind_param, execute, bind_col sequence yourself.
fetch
$row_ref = $sth->fetch;
@row = $sth->fetch;
A context sensitive version of fetch(). When in scalar context, it will act as fetchrow_arrayref. In list context it will use
fetchrow_array.
fetch_hash
$row_ref = $sth->fetch_hash;
%row = $sth->fetch_hash;
A modification on fetchrow_hashref. When in scalar context, it acts just as fetchrow_hashref() does. In list context it returns the
complete hash.
fetchall
$rows_ref = $sth->fetchall;
@rows = $sth->fetchall;
A modification on fetchall_arrayref. In scalar context it acts as fetchall_arrayref. In list it returns an array of references to rows
fetched.
fetchall_hash
$rows_ref = $sth->fetchall_hash;
@rows = $sth->fetchall_hash;
A mating of fetchall_arrayref() with fetchrow_hashref(). It gets all rows from the hash, each as hash references. In scalar context it
returns a reference to an array of hash references. In list context it returns a list of hash references.
ORIGINAL AUTHOR
Michael G Schwern as part of Ima::DBI
CURRENT MAINTAINER
Tony Bowden <tony@tmtm.com>
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
DBI. Ima::DBI. Class::DBI.
perl v5.10.0 2005-09-27 DBIx::ContextualFetch(3pm)