"David W. Tamkin" wrote:
SoloCDM asked,
| Is there anything that allows skipping backwards a few lines when
| processing a message (sed, procmail, ...)?
Skipping backwards in what?
In the procmail rcfile to retry some recipes? Currently, the only way is a
recursive INCLUDERC.
In a set of sed instructions? Sed's b, t, and D commands can do that.
Skipping a few lines back up the message while processing it with sed?
Impossible, but you can save a few lines in the hold space (or accumulate
them in the pattern space with N commands) and then work on the whole group.
You'll need to be a lot more specific.
The following First Sample is one of the scripts I'm interested in for
.procmailrc. The first underscore search works, but it's t-o-o
ambiguous. So, a sample of my proposed idea is in the Second Sample.
The Third Sample shows the input.
First Sample:
sed '/^\(> \)\?_\{56\}$/{N;N;s/^\(> \)\?_\{56\}\n^\(> \)\?Visit our
web site*www\.daily-quotes*\n^\(> \)\?Also, try*fun
game*www\.trigony//;d;}'
Second Sample:
sed '/^\(> \)\?Visit our web site*www\.daily-quotes/,/^\(> \)\?Also,
try*fun game*www\.trigony/{N;N;s/^\(> \)\?_\{56\}\n^\(> \)\?Visit our
web site*www\.daily-quotes*\n^\(> \)\?Also, try*fun
game*www\.trigony*//;d;}'
Third Sample:
________________________________________________________
To remove yourself from this list, send an email to:
daily-quotes-unsubscribe(_at_)topica(_dot_)com
Note: Detailed Document(s) and Sample(s) are more than welcome.
When you reply to this message, please include
the mailing list and my address.
*********************************************************************
Signed,
SoloCDM
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail