procmail
[Top] [All Lists]

Re: skipped braces

2000-09-16 20:58:44
From: "David W. Tamkin" <dattier(_at_)ripco(_dot_)com>

Glad you found it, Dallman.  My first guess wasn't that one was quoted and
one not, but that one was separated by whitespace and one was not.  So my
first guess was wrong.

That was my first, and second, guess too.  Before I added the
surround-spaces and counted, I looked at the individual "words" with {
or } in them:

        fmt -1 ~/.procmailrc | grep [{}]

But I didn't see ay problems.

Then, I couldn't really count that way, because some "words" with
`{' in them also had one or more `}' in them.  That's when I went to
sed to add the surround-spaces.


| 5:03pm ~/Mail> sed 's/{/  & /g; /{/\!d' ~/.procmailrc | fmt -1 | grep -c {  
| 165
| 5:03pm ~/Mail> sed 's/}/  & /g; /}/\!d' ~/.procmailrc | fmt -1 | grep -c }
| 165

Oh, my stars.  If I were still in orthodontia, it would be, "oh, my braces."

  tr -dc '{' < ~/.procmailrc | wc -c
  tr -dc '}' < ~/.procmailrc | wc -c

Well, obviously I know and feel comfortable with sed much more than tr.
I'd have to consult the tr man pages to come up with the -d and -c flags;
whereas I know sed pretty well.  But you're right, and I have no problem
with being scolded with the "right-tool" rule.


Or if you feel whimsical,

  expr `tr -dc '{' < ~/.procmailrc` : '.*'
  expr `tr -dc '}' < ~/.procmailrc` : '.*'


Very funny.  (And I don't even entirely get it, though I mainly do.)
Okay, how about this for whimsy?

11:39pm ~/Mail> fmt -1 ~/.procmailrc | grep '[{}]' | sort | uniq -c | sort -nr 
| head -20
  48   }
  48   {
  35      }
  35      {
  15   "${RECIPE:+$RECIPE
  15      "${RECIPE:+$RECIPE
  14    }
  14    {
  10    "${RECIPE:+$RECIPE
   4                ${domKEY}bot
   3                <${domKEY}bot(_at_)$DOM>"
   2   (.*)${TAB}by
   2           <${domKEY}bot(_at_)$DOM>"
   2           ${domKEY}bot
   2             ${TAB}for
   1   }VIR_01c"
   1   }VIR_01b"
   1   }VIR_01a"
   1   }UBE_22"
   1   }UBE_18"

:-)

-- 
dman(_at_)notnetcom(_dot_)com

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>