How to emulate grep -o option in perl.
I mean to print not all line, only the exact match.
echo "2A2 BB" | perl -ne 'print if /2A2/'
2A2 BB
I want to print only 2A2. (2 Replies)
Hi
By using select clause I'm trying to pull out the rows to a variable.
If the variable has 0 row(s) selected then i'm printing some text message
else printing some other text message
if($xyz =~ m/0 row/)
{
print "0 rows ";
}
else
{
print " There are rows";
}
By my problem... (4 Replies)
I am trying to match a pattern exactly in a shell script. I have tried two methods
awk '/\<mpath${CURR_MP}\>/{print $1 $2}' multipath
perl -ne '/\bmpath${CURR_MP}\b/ and print' /var/tmp/multipath
Both these methods require that I use the escape character. I am guessing that is why... (8 Replies)
I have a file that contains the 2 following lines (from /proc/mounts)
/dev/sdc1 /mnt/backup2 xfs rw,relatime,attr2,noquota 0 0
/dev/sdb1 /mnt/backup xfs rw,relatime,attr2,noquota 0 0
I need to match the string in the second column exactly so that only one result is returned, e.g.
> grep... (2 Replies)
Hello,
My requirement is to iterate over all the lines of a file and compare them with a word and perform some operations if exact match is found.
For the snippet below, it works even if contents of line include "diff" and "diff:". I want it to work only if it is exactly "diff" and is not... (2 Replies)
i have a script in which i need to skip comments, and i am able to achieve it partially...
IN text file:
{****************************
{test : test...test }
Script:
while (<$fh>)
{
push ( @data, $_);
}
if ( $data =~ m/(^{\*+$)/ ){
}
With the above match i am... (5 Replies)
Hi,
I'm trying to match the front and back of a sequence. It works when there is an exact match (obviously), but I need the regex to be more flexible. When we get strings of nucleotides sometimes their prefixes and suffixes aren't exact matches. Sometimes there will be an extra letter and... (2 Replies)
Hi experts,
I have a file with regexes which is used for automatic searches on several files (40+ GB).
To do some postprocessing with the grep result I need the matching line as well as the match itself.
I know that the latter could be achieved with grep's -o option. But I'm not aware of a... (2 Replies)
Hi All,
We have this regex:\\*.*?(.600).*?.(LISTEN|ESTABLISHED)
OS = Solaris 10
The purpose of this regex is to match the ports in output of "netstat -an" and report if any ports between 6000-6009 are getting used. The only problem is if I have something like this (sample output as... (6 Replies)
I am trying to create a cronjob that will run on startup that will look at a list.txt file to see if there is a later version of a database using database.txt as the source. The matching lines are written to output.
$1 in database.txt will be in list.txt as a partial match. $2 of database.txt... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT CENTOS
mail::spamassassin::plugin::spamcop
Mail::SpamAssassin::Plugin::SpamCop(3) User Contributed Perl Documentation Mail::SpamAssassin::Plugin::SpamCop(3)NAME
Mail::SpamAssassin::Plugin::SpamCop - perform SpamCop reporting of messages
SYNOPSIS
loadplugin Mail::SpamAssassin::Plugin::SpamCop
DESCRIPTION
SpamCop is a service for reporting spam. SpamCop determines the origin of unwanted email and reports it to the relevant Internet service
providers. By reporting spam, you have a positive impact on the problem. Reporting unsolicited email also helps feed spam filtering
systems, including, but not limited to, the SpamCop blacklist used in SpamAssassin as a DNSBL.
Note that spam reports sent by this plugin to SpamCop each include the entire spam message.
See http://www.spamcop.net/ for more information about SpamCop.
USER OPTIONS
spamcop_from_address user@example.com (default: none)
This address is used during manual reports to SpamCop as the From: address. You can use your normal email address. If this is not
set, a guess will be used as the From: address in SpamCop reports.
spamcop_to_address user@example.com (default: generic reporting address)
Your customized SpamCop report submission address. You need to obtain this address by registering at "http://www.spamcop.net/". If
this is not set, SpamCop reports will go to a generic reporting address for SpamAssassin users and your reports will probably have less
weight in the SpamCop system.
spamcop_max_report_size (default: 50)
Messages larger than this size (in kilobytes) will be truncated in report messages sent to SpamCop. The default setting is the maximum
size that SpamCop will accept at the time of release.
perl v5.16.3 2011-06-06 Mail::SpamAssassin::Plugin::SpamCop(3)