screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [monitoring-like] would like to be warned when I have mail (fetchmai


From: Gerhard Siegesmund
Subject: Re: [monitoring-like] would like to be warned when I have mail (fetchmail -c)
Date: Thu, 29 Sep 2005 08:57:14 +0200
User-agent: Mutt/1.5.11

Hello Michael

> It should work if you use just echo, as this is a shell builtin.
> If that 'echo something' is an external command or a pipe you have
> to use 'echo something || exit 1'.
> How exactly does the script look like?

Here is the script:

------------------------------------------------------------------------
#!/bin/sh

# Holt sich von fetchmail die Anzahl Mails und gibt diese aus.
#
# Author: Gerhard Siegesmund <address@hidden>

FETCHMAIL='/usr/bin/fetchmail'

while true; do
  $FETCHMAIL -c | sed -e 's/.* \([0-9]*\) messages (\([0-9]*\) seen.*/\1 - 
\2/g' | bc
  sleep 60
done
------------------------------------------------------------------------

Any suggestions?

-- 
cu
  --== Jerri ==--
Homepage: http://www.jerri.de/   ICQ: 54160208
Public PGP Key: http://www.jerri.de/jerris_public_key.asc

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]