[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bash script & Cronjob mail
From: |
Manuel Ifland |
Subject: |
Re: Bash script & Cronjob mail |
Date: |
Mon, 8 Oct 2001 17:12:02 +0200 |
Hello Paul,
thank you very much for your (extremely fast) answer. I tried your solution
in my script and it worked. Now I'll never get any more mails with the
fetchmail output.
Best regards,
Manuel.
> "Manuel Ifland" <mistudio@altavista.de> wrote:
> > If I do this, cron sends a mail that also says "function
> > unimplementet".
>
> I expect there's more to the error message than that. Whatever is
> giving you this message is telling you that you tried to make it do
> something it can't do. You should find out what, and stop trying to
> make it do that.
>
> > #!/bin/sh
> > /usr/bin/fetchmail>/dev/null
> > if [ $? = 0 ]
> > then
> > play sound.wav
> > fi
>
> Try this:
> #!/bin/sh
> if /usr/bin/fetchmail > /dev/null 2>&1; then
> play sound.wav
> fi
>
> > How can I prevent cron from sending me the fetchmail output?
>
> The "2>&1" above will suppress it, if it is indeed coming from
> fetchmail. But the problem it's telling you about will still exist.
>
> > How can I specify parameters in my script for fetchmail?
>
> The same way you normally would.
>
>
> paul