Derived Tools


Table of Contents

tail -f used to start a script 
xargs1 
Misc Shell Scripts Tools in Bin 
T_lc 
T_u 
T_d 
T_uc 
Misc tools example & history 

tail -f used to start a script 

From: Vic Glass @injersey.infi.net
> I need to monitor the output of a program and start a script when
> a specific word is in the output. That is, whenever the program
> writes ADMIN, I want to be automatically notified.

A Bourne Shell solution:

tail -f |
while read line
do
    if expr "$line" : '.*ADMIN.*'
    then
        mailx you <<-!
        message of your choice
        !
    fi
done

documented on: 04-25-99 13:26:51