Bayes daily cron job
John Van Ostrand
john at netdirect.ca
Fri Nov 10 14:07:00 GMT 2006
On Thu, 2006-11-09 at 23:13 -0600, Integrated Technologies wrote:
> I am running the following:
> #! /bin/bash
> # re-builds the Bayes database daily
> /usr/bin/sa-learn --sync --force-expire \
> -p /etc/MailScanner/spam.assassin.prefs.conf
> I placed the following script in my /etc/cron.daily folder and it is
> giving me this error:
> /etc/cron.daily/bayes.cron: line 4: -p: command not found
> When I remove the –p switch, I receive the following error:
> /etc/cron.daily/bayes.cron: line
> 4: /etc/MailScanner/spam.assassin.prefs.conf: Permission denied
Your problem is that the backslash (\) is not working. It indicates line
continuance when followed by a line feed. Here is what I think is wrong:
1. There is a space, tab or other whitespace character after the \.
2. Your script has CRLF line breaks because it was created in windows.
I think it's option 1. delete the blank after the \ or simply remove the
backslash and join the two lines.
John Van Ostrand Net Direct Inc.
CTO, co-CEO 564 Weber St. N. Unit 12
Waterloo, ON N2L 5C6
john at netdirect.ca ph: 518-883-1172 x5102
Linux Solutions / IBM Hardware fx: 519-883-8533
More information about the MailScanner