-----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