Re: shell errors

Udi <[email protected]>
Newsgroups gmane.mail.procmail
Organization TAU
Message-ID <[email protected]>
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?
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.