Thanks,
Tony

But in this case I will receive messages not once, but periodically. Is
there a way, to get mail if it got down, and the next mail when the T1 line
becomes Up and so on. In other words I need a mail message when the Line
status is changed, but not a massages with the same T1 line status.

Thanks.


----- Original Message -----
From: "Anthony E. Greene" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 05, 2002 3:21 AM
Subject: Re: Scripting


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 05-Nov-2002/02:37 -0500, RH <[EMAIL PROTECTED]> wrote:
> >Hello
> >In my t1.txt log file I have such lines
> >
> >T1 1/1 is up.
> >Applique type is Channelized T1
> >Cablelength is short 133
> >No alarms detected.
> >
> >Now if it is possible with a shell script I would like to check the
> >following.  If the first line get's value T1 1/1 is down, to have a mail
> >message whit a subject T1 is down, and when the T1 gets UP, to have a
> >mail message whit a subject T1 is up.
>
> #!/bin/sh
> subject=`head -n 1 logfile`
> echo 'This is the status' | mail -s "$subject" [EMAIL PROTECTED]
>
>
> Tony
> - --
> Anthony E. Greene <mailto:Anthony%20E.%20Greene%20%3Cagreene@;pobox.com%3E>
> OpenPGP Key: 0x6C94239D/7B3D BD7D 7D91 1B44 BA26  C484 A42A 60DD 6C94 239D
> AOL/Yahoo Messenger: TonyG05    HomePage: <http://www.pobox.com/~agreene/>
> Linux. The choice of a GNU generation <http://www.linux.org/>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: Anthony E. Greene <mailto:agreene@;pobox.com> 0x6C94239D
>
> iD8DBQE9x391pCpg3WyUI50RApFHAKDxSpZwCuaI771uaWuZE8zuva7qkwCdHl0Z
> hOKsMedQ7VWxUAqTFO5GwSk=
> =AMty
> -----END PGP SIGNATURE-----
>
>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe
> https://listman.redhat.com/mailman/listinfo/redhat-list



-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to