Are you trying to remove these words from your input files? Try:
Can more than one of these words appear on a line? Try:
Or are you trying to delete lines that contain these words? Try:
Hi-
I am trying to search a large file with a number of different search terms that are listed one per line in 3 different files. Most importantly I need to be able to do a case insensitive search.
I have tried just using egrep -f but it doesn't seam to be able to handle the -i option when... (3 Replies)
I would like to print result of multiple search pattern invoked from an one liner. The code looks like this but won't work
gawk -F '{{if ($0 ~ /pattern1/) pat1=$1 && if ($0 ~ /pattern2/) pat2=$2} ; print pat1, pat2}'
Can anybody help getting the right code? (10 Replies)
Hi,
I have a file that contains strings and numbers. I want to search for a particular string and then print out the numbers next to this string.
For example the file looks like in the file I want to search for the line
AFUE 0.
AOXI 0.
VFUE 600.
VOXI 1573.241
TFUE ... (2 Replies)
I have a file that is a sort library in the format:
##def title1
content1
stuff1
content2
stuff2
##enddef
##def title2
etc..
I want to grep def and content and pull some trailing context from content
so the result would look something like: (1 Reply)
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
Based on the forums i have tried with grep command but i am unable to get the required output.
search this value /*------
If that is found then search for temp_vul and print
and also search until /*------- and print new_vul
Input file contains:
... (5 Replies)
I have a flat file that looks like this, let's call it Chromosome_9.txt:
FT /Gene_Name="Guanyl-Acetylase 9"
FT /Gene_Number"36952"
FT /Gene_Name="Endoplasmic Luciferase"
FT /Gene_Number"36953"
FT ... (4 Replies)
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)
Hi,
I am Searching for Multiple strings in a given date range and print the Group if they exists. the below is the format:
-------------------------------------------------------------------------------------------------------------------------
ID: FIRST ID
MESSAGE: Event Message... (5 Replies)
Discussion started by: linuxuser999
5 Replies
LEARN ABOUT DEBIAN
wiki::toolkit::search::base
Wiki::Toolkit::Search::Base(3pm) User Contributed Perl Documentation Wiki::Toolkit::Search::Base(3pm)NAME
Wiki::Toolkit::Search::Base - Base class for Wiki::Toolkit search plugins.
SYNOPSIS
my $search = Wiki::Toolkit::Search::XXX->new( @args );
my %wombat_nodes = $search->search_nodes("wombat");
This class details the methods that need to be overridden by search plugins.
METHODS
"new"
my $search = Wiki::Toolkit::Search::XXX->new( @args );
Creates a new searcher. By default the arguments are just passed to "_init", so you may wish to override that instead.
"search_nodes"
# Find all the nodes which contain the word 'expert'.
my %results = $search->search_nodes('expert');
Returns a (possibly empty) hash whose keys are the node names and whose values are the scores in some kind of relevance-scoring system I
haven't entirely come up with yet. For OR searches, this could initially be the number of terms that appear in the node, perhaps.
Defaults to AND searches (if $and_or is not supplied, or is anything other than "OR" or "or").
Searches are case-insensitive.
"analyze"
@terms = $self->analyze($string)
Splits a string into a set of terms for indexing and searching. Typically this is done case-insensitively, splitting at word boundaries,
and extracting words that contain at least 1 word characters.
"fuzzy_title_match"
$wiki->write_node( "King's Cross St Pancras", "A station." );
my %matches = $search->fuzzy_title_match( "Kings Cross St. Pancras" );
Returns a (possibly empty) hash whose keys are the node names and whose values are the scores in some kind of relevance-scoring system I
haven't entirely come up with yet.
Note that even if an exact match is found, any other similar enough matches will also be returned. However, any exact match is guaranteed
to have the highest relevance score.
The matching is done against "canonicalised" forms of the search string and the node titles in the database: stripping vowels, repeated
letters and non-word characters, and lowercasing.
"index_node"
$search->index_node($node, $content);
Indexes or reindexes the given node in the search engine indexes. You must supply both the node name and its content.
canonicalise_title
$fuzzy = $self->canonicalise_title( $ node);
Returns the node title as suitable for fuzzy searching: with punctuation and spaces removes, vowels removed, and double letters squashed.
"delete_node"
$search->delete_node($node);
Removes the given node from the search indexes. NOTE: It's up to you to make sure the node is removed from the backend store. Croaks on
error.
"supports_phrase_searches"
if ( $search->supports_phrase_searches ) {
return $search->search_nodes( '"fox in socks"' );
}
Returns true if this search backend supports phrase searching, and false otherwise.
"supports_fuzzy_searches"
if ( $search->supports_fuzzy_searches ) {
return $search->fuzzy_title_match("Kings Cross St Pancreas");
}
Returns true if this search backend supports fuzzy title matching, and false otherwise.
SEE ALSO
Wiki::Toolkit
perl v5.14.2 2012-05-28 Wiki::Toolkit::Search::Base(3pm)