01-05-2006
Thanks a lot Vino.. that was of really helpful!
regards
sirisha
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to check the second argument for a specific string .
The code below is what I am trying, but I get:
UX:test (./test): ERROR: { if ($0 ~ /StringImLooking4/) {print $1} }: Unknown operator
I want to test if the second argument contains the string StringImLooking4
Unixware 7
... (1 Reply)
Discussion started by: dinplant
1 Replies
2. UNIX for Advanced & Expert Users
Hello,
I am wondering if you can assist with my question and ask kindly for this.
I have a number of files that are listed as file1.gz through file100.gz.
I am trying to perform a grep on the files and find a specific date that only resides within within one of the files. There are... (3 Replies)
Discussion started by: legharb
3 Replies
3. Shell Programming and Scripting
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)
Discussion started by: bludhemn
8 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I have a csv file like the following:
"ABCD2","EFGH2","XXXX","1"
"ABCD2","EFGH2","XXXX","2"
I want to grep out the row which contains the value of 2 within the 4th column, so then i can use the extracted record to cut up and store into numerous variables.
Obviously when... (3 Replies)
Discussion started by: RichZR
3 Replies
5. UNIX for Dummies Questions & Answers
How do you grep cells that contain a specific string. I tried grep but it greps the whole line and not just the cells. Thanks! (4 Replies)
Discussion started by: evelibertine
4 Replies
6. Shell Programming and Scripting
hi my code is something like
count=0
echo "oracle TABLESPACE NAME nd TARGET"
while
do
count=`expr $count + 1`
(1) tts_space_name$count=`echo $tts | cut -d "," -f$count`
(2) target$count=grep $(tts_space_name$count)... (2 Replies)
Discussion started by: Gl@)!aTor
2 Replies
7. UNIX for Dummies Questions & Answers
i have file input
dsgfdgdfgd> cab |egrep -i '(active|cbu)'
130502-11:34:11 10.133.1.153 9.0j stopfile=/tmp/15959
Trying password from ipdatabase file: /opt/ericsson/amos/moshell/sitefiles/ipdatabase...
.. 0 1 CBU1 OFF ON 16HZ ROJ1192209/1 R5E TU8BZ04466... (3 Replies)
Discussion started by: radius
3 Replies
8. Shell Programming and Scripting
Hi,
I have a file with "n" number of lines. I need to get rid of a specific line having a specific string from the file. I tried some possibilities but not successful.
For ex: in a file named "test"
hope should be removed along with the line.
... (8 Replies)
Discussion started by: ricky-row
8 Replies
9. Shell Programming and Scripting
Hello,
I know there are many questions and replies regarding grep command.
What I would like to do is a bit different.
File A:
hello world welcome to my page
this is my test site
how are you
I am fine, thank you
where have you been
I was in hospital
really hope you are fine now
Thanks,... (10 Replies)
Discussion started by: baris35
10 Replies
10. Shell Programming and Scripting
Hello,
I have two files. All urls are space seperated.
source
http://xx.yy.zz http://df.ss.sd.xz http://09.09.090.01
http://11.22.33 http://canada.xx.yy http://01.02.03.04
http://33.44.55 http://98.87.76.65 http://russia.xx.zz
http://aa.tt.xx.zz http://1w.2e.3r.4t http://china.rr.tt
... (4 Replies)
Discussion started by: baris35
4 Replies
LEARN ABOUT MOJAVE
xml::libxml::pi
XML::LibXML::PI(3) User Contributed Perl Documentation XML::LibXML::PI(3)
NAME
XML::LibXML::PI - XML::LibXML Processing Instructions
SYNOPSIS
use XML::LibXML;
# Only methods specific to Processing Instruction nodes are listed here,
# see XML::LibXML::Node manpage for other methods
$pinode->setData( $data_string );
$pinode->setData( name=>string_value [...] );
DESCRIPTION
Processing instructions are implemented with XML::LibXML with read and write access. The PI data is the PI without the PI target (as
specified in XML 1.0 [17]) as a string. This string can be accessed with getData as implemented in XML::LibXML::Node.
The write access is aware about the fact, that many processing instructions have attribute like data. Therefore setData() provides besides
the DOM spec conform Interface to pass a set of named parameter. So the code segment
my $pi = $dom->createProcessingInstruction("abc");
$pi->setData(foo=>'bar', foobar=>'foobar');
$dom->appendChild( $pi );
will result the following PI in the DOM:
<?abc foo="bar" foobar="foobar"?>
Which is how it is specified in the DOM specification. This three step interface creates temporary a node in perl space. This can be
avoided while using the insertProcessingInstruction() method. Instead of the three calls described above, the call
$dom->insertProcessingInstruction("abc",'foo="bar" foobar="foobar"');
will have the same result as above.
XML::LibXML::PI's implementation of setData() documented below differs a bit from the standard version as available in XML::LibXML::Node:
setData
$pinode->setData( $data_string );
$pinode->setData( name=>string_value [...] );
This method allows one to change the content data of a PI. Additionally to the interface specified for DOM Level2, the method provides
a named parameter interface to set the data. This parameter list is converted into a string before it is appended to the PI.
AUTHORS
Matt Sergeant, Christian Glahn, Petr Pajas
VERSION
2.0110
COPYRIGHT
2001-2007, AxKit.com Ltd.
2002-2006, Christian Glahn.
2006-2009, Petr Pajas.
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.18.2 2014-02-01 XML::LibXML::PI(3)