Hi
I am trying to search for a particular occurrence of a string in a file, and if found, append another string to the end of that line.
Here is my file contents:
column1 userlist default nowrite=3 output=4
column2 access default nowrite=3
Here is the code:
A="user=1... (1 Reply)
I have 2 files that I am working with
$ cat file1
server1
server3
server5
server6
server8
$ cat file2
server1;Solaris;
server2; SLES;
server3;Linux;
server4; Solaris;
server5;SLES;
server6;SLES;
server7;Solaris;
server8;Linux; (1 Reply)
I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios.
Cat test
Nov 10, 2012 5:17:53 AM
INFO: Request Type
Line 1.... (5 Replies)
Hi,
I have a File, which have multiple rows.
Like below
123456 Test1 FNAME JRW#$% PB MO Approver XXXXXX. YYYY
123457 Test2 FNAME JRW#$% PB MO Super XXXXXX. YYYY
123458 Test3 FNAME JRW#$% PB MO Approver XXXXXX. YYYY
I want to search a line which contains PB MO Approver and append... (2 Replies)
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB and add/replace... (1 Reply)
Dear All
I am having a text file which is having more than 200 lines.
EX:
001010122 12000 BIB 12000 11200 1200003
001010122 2000 AND 12000 11200 1200003
001010122 12000 KVB 12000 11200 1200003
In the above file i want to search for string KVB... (5 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)
Hi all,
i have a generated report in unix in the following command like
input.txt
47.85,10
0124,42.35,8
0125,3.5,2
the input file format is fixed
I need the my output file with append text as below
output.txt
0124 amount:42.35
0125 amount:3.5
0124 count : 8
0125... (34 Replies)
I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file.
Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
LEARN ABOUT DEBIAN
search::xapian::termgenerator
Xapian::TermGenerator(3pm) User Contributed Perl Documentation Xapian::TermGenerator(3pm)NAME
Search::Xapian::TermGenerator - Parses a piece of text and generates terms.
DESCRIPTION
This module takes a piece of text and parses it to produce words which are then used to generate suitable terms for indexing. The terms
generated are suitable for use with Search::Xapian::Query objects produced by the Search::Xapian::QueryParser class.
SYNOPSIS
use Search::Xapian;
my $doc = new Search::Xapian::Document();
my $tg = new Search::Xapian::TermGenerator();
$tg->set_stemmer(new Search::Xapian::Stem("english"));
$tg->set_document($doc);
$tg->index_text("The cat sat on the mat");
METHODS
new TermGenerator constructor.
set_stemmer <stemmer>
Set the Search::Xapian::Stem object to be used for generating stemmed terms.
set_stopper <stopper>
Set the Search::Xapian::Stopper object to be used for identifying stopwords.
set_document <document>
Set the Search::Xapian::Document object to index terms into.
get_document <document>
Get the currently set Search::Xapian::Document object.
index_text <text> [<weight> [<prefix>]]
Indexes the text in string <text>. The optional parameter <weight> sets the wdf increment (default 1). The optional parameter
<prefix> sets the term prefix to use (default is no prefix).
index_text_without_positions <text> [<weight> [<prefix>]]
Just like index_text, but no positional information is generated. This means that the database will be significantly smaller, but that
phrase searching and NEAR won't be supported.
increase_termpos [<delta>]
Increase the termpos used by index_text by <delta> (default 100).
This can be used to prevent phrase searches from spanning two unconnected blocks of text (e.g. the title and body text).
get_termpos
Get the current term position.
set_termpos <termpos>
Set the current term position.
get_description
Return a description of this object.
REFERENCE
http://www.xapian.org/docs/sourcedoc/html/classXapian_1_1TermGenerator.html
perl v5.14.2 2012-05-09 Xapian::TermGenerator(3pm)