Sponsored Content
Top Forums Shell Programming and Scripting Searching a pattern in a file. Post 302411743 by chihung on Friday 9th of April 2010 10:01:25 AM
Old 04-09-2010
Is that XML-like message tag suppose to be in one line or it will span over a few lines

If it will span over a few lines, do you also want to display the complete XML-like tag

You need to specific on this
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

searching for a pattern in a file and forwarding result to another

Hi, I am trying to search through a file for a particular word, then once found, I want the search to carry on for another 30 lines and append all this to a new file. For example, I search for the word "test" in hello.txt: <--some code--> <--some code--> <--some code--> test <--some more... (7 Replies)
Discussion started by: ocelot
7 Replies

2. Shell Programming and Scripting

searching pattern in another file and print

Suppose u have a file 12 22 73 another file L22D SSS S12J LLL H77K PPP J25O LOP I73S lOP K99O PLO so output shud like S12J LLL L22D SSS I73S lOP Thanks (2 Replies)
Discussion started by: cdfd123
2 Replies

3. UNIX for Advanced & Expert Users

searching one pattern in file and also counting

Hi, everybody this is my pattern in a file thomson, nicolas 5-3871 Wong, Fred 4-4123 Jones, Thomas 1-4122 Salazar, Richard 5-2522 first name and last names of people fallowed by Tele. while i am searching for pattern first name begin with 'S'... (8 Replies)
Discussion started by: ksr.test
8 Replies

4. Shell Programming and Scripting

Searching words in a file containing a pattern

Hi all, I would like to print words in a file seperated by whitespaces containing a specific pattern like "=" e.g. I have a file1 containing strings like %cat file1 The= some= in wish= born <eof> .I want to display only those words containing = i.e The= , some=,wish= ... (5 Replies)
Discussion started by: sree_123
5 Replies

5. Shell Programming and Scripting

Searching a pattern in file and deleting th ewhole line containing the pattern

Hi All, Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern. #!bin/sh # The pattern that user want to add to the files echo "Enter the pattern of the redirect" read value # check if the user has... (1 Reply)
Discussion started by: Shazin
1 Replies

6. UNIX for Dummies Questions & Answers

Searching the date pattern in a file

Hi, I would like to search the pattern based on the date like "2010/08/15". I tried using / in the file giving /<<pattern>>. when i tried this it turns to /2010/+8, but not going to the pattern what ever i want. This is how the data in the file. INFO | jvm 1 | 2010/05/26 13:30:33... (5 Replies)
Discussion started by: venkatesht
5 Replies

7. Shell Programming and Scripting

Searching for a pattern in a file...

The problem is similar to my yesterday post I Would like an awk script that does the following: I have a file (f1) that contains 1 2 3 4 5and another one (f2) that contains 8|a 9|b 0|c 1|d 2|e 3|f 4|g 5|h 6|i 7|jAnd I'd like to get this: 1|d 2|e 3|f 4|g (5 Replies)
Discussion started by: tukuyomi
5 Replies

8. Shell Programming and Scripting

Remove the footer from a flat file by searching a pattern

Hi, I have more than 30,000 records in a flat file. I want to remove footer from the file by searching a string pattern for the footer. Example.... let the flat file test.dat contains below records. record1 record2 record3 .. .. .. record31000 Total records 31000 I want to remove the... (6 Replies)
Discussion started by: gani_85
6 Replies

9. UNIX for Dummies Questions & Answers

Searching for a pattern from filenames stored in a file

Hi, I have got some 10 filenames stored in a file or displayed in the console as a result of some query i made.. Now I need to open each of these files and search for a pattern in these 10 files.. Can someone help me with this? Thanks, Jean (9 Replies)
Discussion started by: jeanjkj
9 Replies

10. Shell Programming and Scripting

Searching the file of below pattern through perl script from different location

Hi All, I am creating a small per script but I am getting the error "Unable to open file because No such file or directory".My code is below.I am trying to go into the below location so using chdir and then seraching the log files of below pattern. #!/usr/bin/perl -w chdir... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies
DOM(3pm)						User Contributed Perl Documentation						  DOM(3pm)

NAME
XML::Generator::DOM - XML::Generator subclass for producing DOM trees instead of strings. SYNOPSIS
use XML::Generator::DOM; my $dg = XML::Generator::DOM->new(); my $doc = $dg->xml($dg->xmlcmnt("Test document."), $dg->foo({'baz' => 'bam'}, 42)); print $doc->toString; yields: <?xml version="1.0" standalone="yes"?> <!--Test document--> <foo baz="bam">42</foo> DESCRIPTION
XML::Generator::DOM subclasses XML::Generator in order to produce DOM trees instead of strings (see XML::Generator and XML::DOM). This module is still experimental and its semantics might change. Essentially, tag methods return XML::DOM::DocumentFragment objects, constructed either from a DOM document passed into the constructor or a default document that XML::Generator::DOM will automatically construct. Calling the xml() method will return this automatically constructed document and cause a fresh one to be constructed for future tag method calls. If you passed in your own document, you may not call the xml() method. Below, we just note the remaining differences in semantics between XML::Generator methods and XML::Generator::DOM methods. CONSTRUCTOR
These configuration options are accepted but have no effect on the semantics of the returned object: escape, pretty, conformance and empty. TAG METHODS
Subsequently, tag method semantics are somewhat different for this module compared to XML::Generator. The primary difference is that tag method return XML::DOM::DocumentFragment objects. Namespace and attribute processing remains the same, but remaining arguments to tag methods must either be text or other XML::DOM::DocumentFragment objects. No escape processing, syntax checking, or output control is done; this is all left up to XML::DOM. SPECIAL TAGS
All special tags are available by default with XML::Generator::DOM; you don't need to use 'conformance' => 'strict'. xmlpi(@args) Arguments will simply be concatenated and passed as the data to the XML::DOM::ProcessingInstruction object that is returned. xmlcmnt Escaping of '--' is done by XML::DOM::Comment, which replaces both hyphens with '&#45;'. An XML::DOM::Comment object is returned. xmldecl Returns an XML::DOM::XMLDecl object. Respects 'version', 'encoding' and 'dtd' settings in the object. xmldecl Returns an XML::DOM::DocumentType object. xmlcdata Returns an XML::DOM::CDATASection object. xml As described above, xml() can only be used when dom_document was not set in the object. The automatically created document will have its XML Declaration set and the arguments to xml() will be appended to it. Then a new DOM document is automatically generated and the old one is returned. This is the only way to get a DOM document from this module. perl v5.12.4 2004-03-23 DOM(3pm)
All times are GMT -4. The time now is 01:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy