Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, November 14, 2026

File: [Platon] / scripts / shell / mailcheck / mailcheck.sh (download)

Revision 1.1, Tue Jun 18 00:57:56 2002 UTC (24 years, 5 months ago) by host8

Script for sending notification about new mail to user's terminal.

#!/bin/bash

# $Id: mailcheck.sh,v 1.1 2002/06/18 00:57:56 host8 Exp $

# This script will be started via procmail after arriving mail
# It send information about new mail to user's terminal.

ttys="`finger $LOGNAME | awk '/^On since/ {print $(NF-2)}' 2> /dev/null`"

notify()
{
    echo
    echo "NEW MAIL in $*"
    echo
}

for i in $ttys;
do
    notify "$*" > /dev/$i;
done

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top