Re: Fraudulent eBay listing
- From: dnichols@xxxxxxxxxxx (DoN. Nichols)
- Date: 4 Jul 2007 19:33:57 GMT
According to Steve Ackman <usenet2002@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>:
In <f6fap701f5t@xxxxxxxxxxxxxxxxx>, on 4 Jul 2007 05:21:43 GMT, DoN.
Nichols, dnichols@xxxxxxxxxxx wrote:
According to Steve Ackman <usenet2002@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>:
[ ... ]
$ grep "^From: Ignoramus[1-9][0-9]*" * | wc -l
1633
if you are using true REs (Regular Expressions), because only the first
digit is never zero. (Because it is apparently the PID of his
newsreader at that time -- a one to five digit number with no leading
zeros.) The RE which you used would miss ones with zero appearing in
following digits. But there is no harm in using the original:
Ignoramus[0-9]*
Why filter on extraneous characters? Filter just
as many as are required. Probably Ignor* would do it
just as well.
$ grep "^From: Ignor*" * | wc -l
1633
it would simply match some strings which were never used, but it would
use quite a bit fewer CPU cycles over time. :-)
But... if a newsreader can use wildcards/regex, why
bother with the numeric aspect at all? Just filter on
(depending on what regex you're using, and what exactly
you want to filter) one of these,
Ignoramus*
Ingormaus.+
Ignoramus.*
Yes, those would work too, except perhaps the first of that
three. (Unless your RE implementation is different from the unix ones.)
Of course the first works. Why would you think
it wouldn't? (These are done on FreeBSD, but grep is
fairly standard across all the unices)
O.K. I had not noticed that you were using plain grep, instead
of egrep. Plain grep does not use true REs. In plain grep, '*' simply
stands for "any number of any character", while in true REs (including
in egrep), * simply stands for "zero or more of the preceding
character", so you would need ".*" (. being "any character", and ".*"
matches any number of any character.
I expected you to be using REs built into the newsreader in a
killfile, not plain grep for filtering. After all, the purpose is to
filter him out of usenet articles presented by your newsreder.
$ grep "^From: Ignoramus*" * | wc -l
1633
$ grep "^From: Ignoramus.+" * | wc -l
0
duh... this is looking for Ingoramuss(s)(s)(s)...
Depends. With true REs, it would be "Ignoramus" plus any number
of any character.
$ grep "^From: Ignoramus.*" * | wc -l
1633
Bottom line: TMTOWTDI... but why make your filter
more complex than it needs to be?
Agreed. But the digits following "Ignoramus" are a more certain
identifier than just "Ignoramus".
And if so -- and it is being done with something using true REs
instead of just plain grep, there are a number of his IDs which have
zero as other than the first digit. In what is saved from the newsgroup
this year, I find:
258 IDs with zeros present out of 714 total IDs. So -- your
expression for grep (if you are including digits) may not work in a
Killfile, unless it is based on plain grep. :-)
And -- BTW -- my newsreader saves the articles with the ':'
removed from the "From: " -- in "mailbox" format, so there your pattern
would not work at all. :-) But, of course, that is *after* I have read
and saved articles, so that is different. (I no longer have a true news
feed, so I can't simply grep the news spool. :-)
EVEN filtering "Ig" would do it, but then you risk some
day filtering a new participant named Ignatius or Igor...
Or -- someone who has a munged e-mail address of
"Ignore-this@not-my-domain". :-)
Enjoy,
DoN.
--
Email: <dnichols@xxxxxxxxxxx> | Voice (all times): (703) 938-4564
(too) near Washington D.C. | http://www.d-and-d.com/dnichols/DoN.html
--- Black Holes are where God is dividing by zero ---
.
- Follow-Ups:
- Re: Fraudulent eBay listing
- From: Steve Ackman
- Re: Fraudulent eBay listing
- References:
- Re: Fraudulent eBay listing
- From: DoN. Nichols
- Re: Fraudulent eBay listing
- From: Steve Ackman
- Re: Fraudulent eBay listing
- Prev by Date: Re: Moving a 20' shipping container 20 feet by hand
- Next by Date: Re: Moving a 20' shipping container 20 feet by hand
- Previous by thread: Re: Fraudulent eBay listing
- Next by thread: Re: Fraudulent eBay listing
- Index(es):
Relevant Pages
|