Dear friends,
please tell me how to find the files which are existing in the current directory, but it sholud not search in the sub directories..
it is like this,
current directory contains
file1, file2, file3, dir1, dir2
and dir1 conatins
file4, file5
and dir2 contains
file6,... (9 Replies)
Hi,
I have defined an array which holds a couple of elements which are nothing but files names. I want to find the files in a directory for the matching file name(array elements) with less than 1 day old.
When I am trying to execute the code (as below), it gives an error.
Your help in this... (1 Reply)
Hello,
I am working on solving an NP-Complete problem, so it is very important that operations and data with limited integer-argument ranges be computed using immutable look-up-tables contained entirely in CPU cache. Retrieval of the look-up-table data must never leave the CPU once initially... (6 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
I have a file1.txt
file1.txt
F-120009210","Felix","U-M-F-F-F-","white","yes","no","U-M-F-F-F-","Bristol","RI","true"
F-120009213","Fluffy","U-F-","white","yes","no","M-F-","Warwick","RI","true"
U-120009217","Lity","U-M-","grey","yes","yes","","Fall River","MA","true"... (4 Replies)
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
These three finds worked as expected:
$ find . -iname "*.PDF"
$ find . -iname "*.PDF" \( ! -name "*_nobackup.*" \)
$ find . -path "*_nobackup*" -prune -iname "*.PDF"
They all returned the match:
./folder/file.pdf
:b:
This find returned no matches:
$ find . -path "*_nobackup*" -prune... (3 Replies)
I need to find two matches in the output from ps. I am searching with ps -ef |grep mysql for:
my.cnf
/bin/sh /usr/bin/mysqld_safe --defaults-file=/data/mysql/master/agis_core/etc/my.cnf
after this match I want to search back and match the hostname which is x number of lines back, above the... (2 Replies)
Discussion started by: bash_in_my_head
2 Replies
LEARN ABOUT DEBIAN
kinosearch1::search::hits
KinoSearch1::Search::Hits(3pm) User Contributed Perl Documentation KinoSearch1::Search::Hits(3pm)NAME
KinoSearch1::Search::Hits - access search results
SYNOPSIS
my $hits = $searcher->search( query => $query );
$hits->seek( 0, 10 );
while ( my $hashref = $hits->fetch_hit_hashref ) {
print "<p>$hashref->{title} <em>$hashref->{score}</em></p>
";
}
DESCRIPTION
Hits objects are used to access the results of a search. By default, a hits object provides access to the top 100 matches; the seek()
method provides finer-grained control.
A classic application would be paging through hits. The first time, seek to a START of 0, and retrieve 10 documents. If the user wants to
see more -- and there are more than 10 total hits -- seek to a START of 10, and retrieve 10 more documents. And so on.
METHODS
seek
$hits->seek( START, NUM_TO_RETRIEVE );
Position the Hits iterator at START, and capture NUM_TO_RETRIEVE docs.
total_hits
my $num_that_matched = $hits->total_hits;
Return the total number of documents which matched the query used to produce the Hits object. (This number is unlikely to match
NUM_TO_RETRIEVE.)
fetch_hit
while ( my $hit = $hits->fetch_hit ) {
# ...
}
Return the next hit as a KinoSearch1::Search::Hit object.
fetch_hit_hashref
while ( my $hashref = $hits->fetch_hit_hashref ) {
# ...
}
Return the next hit as a hashref, with the field names as keys and the field values as values. An entry for "score" will also be present,
as will an entry for "excerpt" if create_excerpts() was called earlier. However, if the document contains stored fields named "score" or
"excerpt", they will not be clobbered.
create_excerpts
my $highlighter = KinoSearch1::Highlight::Highlighter->new(
excerpt_field => 'bodytext',
);
$hits->create_excerpts( highlighter => $highlighter );
Use the supplied highlighter to generate excerpts. See KinoSearch1::Highlight::Highlighter.
COPYRIGHT
Copyright 2005-2010 Marvin Humphrey
LICENSE, DISCLAIMER, BUGS, etc.
See KinoSearch1 version 1.00.
perl v5.14.2 2011-11-15 KinoSearch1::Search::Hits(3pm)