procmail
[Top] [All Lists]

Re: shell errors

2013-09-10 02:20:09

On 09/09/13 17:26, LuKreme wrote:
I am getting a very occasional error (maybe 1 in 100?) in my procmail logs on a 
fairly low-traffic email account.

/usr/local/bin/bash: -c: line 0: unexpected EOF while looking for matching `"'
/usr/local/bin/bash: -c: line 1: syntax error: unexpected end of file

I've looked at .procmailrc and the two included RC files that get loaded with a  
syntax-coloring editor and don't see any missing "s anywhere.

Looking for all the shell escapes:

$ grep \` .procmailrc .list_procmail .list_local
I guess the you want to grep the shell call's but try to grep the  \"   also
becouse of the error message.      The command
awk -F'["]' '{print NF-1"\t"$0}' .procmailrc .list_procmail .list_local
will give you the number of  "s  per line.

It is possible that the \"  are balanced and one of the "s  is hidden from
the shell by  escape char  or inside variable.

And of course, debug following Julian's advice.

--udi


.procmailrc:DATE=`date '+%d-%b-%Y'`
.procmailrc:MYDATE=`date '+%Y-%m'`
.procmailrc:LONGDATE=`date "+%Y-%b-%d %H:%M:%S %z"`
.procmailrc:    SUBJECT=`formail -zx "Subject:"`
.procmailrc:ISLISTED=`grep -i "^$CLEANFROM " $WHITELIST`
.procmailrc:    SUBJECT=`formail -zx "Subject:"`
.procmailrc:READIT=`grep -i "^$CLEANFROM" $READLIST`
.procmailrc:  SUBJECT=`formail -zx "Subject:"`
.list_procmail:#MYDATE=`date '+%Y-%m'`

Everything looks balanced.

Where am I forgetting to look?

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

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