procmail
[Top] [All Lists]

Problem w/ filter recipe

1997-02-01 11:10:52
I have a simple that includes a multi-line sed command.  The command
arguments are enclosed in single quotes, which in sh, and in procmail
variable assignments, will allow it to span multiple lines.  

The filter recipe looks like:

        :0fb
        | $SED '
                /^end[  ]*$/ i\
                ---\
                (File uudecoded into $FILESPEC)\
                ---
                /^begin/,/^end[  ]*$/ d
                ' | \
          $SED "s%\$FILESPEC%$FILEDIR/$FILENAME%g"

And instead of executing as expected, generates a series of "Skipped..."
messages as procmail tries to interpret each line by itself.  I've tried
bracketing the whole thing in '()', but no luck.

Is there a way to escape this so that it will work as intended?  An
almost identical construct works fine in the context of a procmail
variable assignment (surrounded, of course, with backquotes); I'm
curious why this recipe doesn't behave the same way.

-- Lars

---
Lars Kellogg-Stedman * lars(_at_)bu(_dot_)edu * (617)353-8277
Office of Information Technology, Boston University

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