10-21-2009
Thanks zaxxon,
I search multiple diroctorys. and then the filename is given only when there are multiple files with this wildcard. I would like but generally each file matches the format printing:
DateiInhalt.
---------- Post updated at 03:35 AM ---------- Previous update was at 03:31 AM ----------
I searching a string in a file...and would like the console-printing:
FileContent e.g. file1HelloWorld
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am having a hard time trying to do the following:
I have a file that looks like this:
0 CacheMaxConn 4 64
0 RMThread 16 3423423
7 DataSource 0 /hello/sas/ses
0 {94545B4-E343-1410-81E4-08000000} 3 DDBE
3 ... (4 Replies)
Discussion started by: yotoruja
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I would like to do a search and replace on a file using vi.
Something like this:
:%s/dst_port=****//g
I want to search the entire file and replace all text that does not match dst_port=**** with space or nothing. In other words delete everything except for dst_port=****. The four *... (1 Reply)
Discussion started by: andyblaylock
1 Replies
3. Shell Programming and Scripting
Looking for a bit of help. I need to search for a string of words, but unfortunately these words are located on separate lines.
for example the text output is:
United
Chanmpions
Ronaldo
Liverpool
Losers
Torres
and my script code is
print("DEBUG - checking file message");
while... (15 Replies)
Discussion started by: meevagh
15 Replies
4. Shell Programming and Scripting
Hi ,
i am writing a script in which i am using following command to grep some string and then storing it's output to v, as like below :-
v=$(awk -F, '{ if ( $NF ~ /DEV/ ) print $0 "_BLD01";else print $0 "_RC01" }' mytest)
Here i am facing following issues:-
1. it is searcing DEV in the... (1 Reply)
Discussion started by: inderpunj
1 Replies
5. UNIX for Dummies Questions & Answers
How would i search to find all the lines consisting of of only the letter "z" followed by any four characters? (1 Reply)
Discussion started by: trob
1 Replies
6. Shell Programming and Scripting
Hi,
I have searched through this forum as there are many similar entries but could'nt get one of them to work, either that or they were just different to what I needed.
Basically I have a file, recordsDatabase. In this file are a few different fields. There is a unique identifier eg 001... (5 Replies)
Discussion started by: U_C_Dispatj
5 Replies
7. UNIX for Dummies Questions & Answers
Hi guys,
I have a very common issue :( im trying to work it out but I am still not used to it. my problem is searching. very often I should look for piece of string in a text file or a file itself:
I want to learn some easy and professional commands to ease this routine for me. I want to be... (2 Replies)
Discussion started by: messi777
2 Replies
8. Shell Programming and Scripting
without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Discussion started by: arindamlive
5 Replies
9. Shell Programming and Scripting
Hello all,
I am a newbie in awk. I am struggling in this problem for a long.Actually I have two files, filea and fileb. File a is actually a search key through it I have to find the corresponding japanese tag from file b.
filea contains the data like this:
sm982882 sm1893548
sm2420025... (3 Replies)
Discussion started by: csim_mohan
3 Replies
10. Programming
I have written a code in C where the objective is to search for strings.
There are two files:
1. Database file which has more than one billion entries. This file is read in argv in the C code below. The format of the file is like this:
a.txt apple
b.txt candle
c.txt glue
2. There is another... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
LEARN ABOUT DEBIAN
kinosearch1::searcher
KinoSearch1::Searcher(3pm) User Contributed Perl Documentation KinoSearch1::Searcher(3pm)
NAME
KinoSearch1::Searcher - execute searches
SYNOPSIS
my $analyzer = KinoSearch1::Analysis::PolyAnalyzer->new(
language => 'en',
);
my $searcher = KinoSearch1::Searcher->new(
invindex => $invindex,
analyzer => $analyzer,
);
my $hits = $searcher->search( query => 'foo bar' );
DESCRIPTION
Use the Searcher class to perform queries against an invindex.
METHODS
new
my $searcher = KinoSearch1::Searcher->new(
invindex => $invindex,
analyzer => $analyzer,
);
Constructor. Takes two labeled parameters, both of which are required.
o invindex - can be either a path to an invindex, or a KinoSearch1::Store::InvIndex object.
o analyzer - An object which subclasses KinoSearch1::Analysis::Analyer, such as a PolyAnalyzer. This must be identical to the Analyzer
used at index-time, or the results won't match up.
search
my $hits = $searcher->search(
query => $query, # required
filter => $filter, # default: undef (no filtering)
);
Process a search and return a Hits object. search() expects labeled hash-style parameters.
o query - Can be either an object which subclasses KinoSearch1::Search::Query, or a query string. If it's a query string, it will be
parsed using a QueryParser and a search will be performed against all indexed fields in the invindex. For more sophisticated
searching, supply Query objects, such as TermQuery and BooleanQuery.
o filter - Must be a KinoSearch1::Search::QueryFilter. Search results will be limited to only those documents which pass through the
filter.
Caching a Searcher
When a Searcher is created, a small portion of the invindex is loaded into memory. For large document collections, this startup time may
become noticeable, in which case reusing the searcher is likely to speed up your search application. Caching a Searcher is especially
helpful when running a high-activity app under mod_perl.
Searcher objects always represent a snapshot of an invindex as it existed when the Searcher was created. If you want the search results to
reflect modifications to an invindex, you must create a new Searcher after the update process completes.
COPYRIGHT
Copyright 2005-2010 Marvin Humphrey
LICENSE, DISCLAIMER, BUGS, etc.
See KinoSearch1 version 1.00.
perl v5.14.2 2011-11-15 KinoSearch1::Searcher(3pm)