procmail
[Top] [All Lists]

Re: A tip (was: Reversing text?)

2002-05-15 20:32:34
On Wed, May 15, 2002 at 11:05:59AM +0200, Ruud H.G. van Tol wrote:

But what if MATCH contains spaces?

   Trying a quick simulation of a shorter script on the command line:

   MATCH="But.what.if.MATCH contains.spaces?"                    # A la procmail
   echo $MATCH | awk -F . '{for(i=NF;i;i--) printf("%s/",$i)}'   # Auto split.
   spaces?/MATCH contains/if/what/But/                           # Spaces OK.

   My procmail experience is inversely proportional to my awk,
so I'm not sure if we can replace the echo with some ?? syntax.

   Alternatively, with your version, would procmail expand "$MATCH", as a shell
does, so that spaces are then OK?

Regards,
Erik
_______________________________________________
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>