Jeff Orrok <jeff(_at_)rt(_dot_)com> wrote:
I have made a few tweaks to my recipes since I posted them, so here
they are again, followed by a typical fragment from the log file.
LOGABSTRACT=on and VERBOSE=on
Glad to see that Don and David were able to see what was wrong
vis-a-vis the `h' flag. Yes, that does look like the ticket. Good
going, gentlemen.
LASTMSG=`echo $LASTFOLDER | sed -e "s#.*/##"`
Now that you clarified what you were doing with sed, I can still
tell you how to do it inside procmail, thus saving the pipe and the
call to sed.
:0
* LASTFOLDER ?? /\/[^/]+
{ LASTMSG = $MATCH }
Thank you, I'll try that!
Rereading my recipe, I think it would need to be tweaked further.
The above will only capture what's after the *first* slash. You
want what's after the last. I didn't test my suggestion, and I
haven't tested the below, either, but feel better about it.
Sorry for the red herring.
:0
* LASTFOLDER ?? ()\/[^/]+^^
{ LASTMSG = $MATCH }
This one should work even if LASTFOLDER is in the current dir, i.e.,
doesn't *have* a slash.
--
dman
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail