From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Wed, 7 Sep 2005 23:33:27 -0400 From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: Subject: [9fans] Re: patch auto-mails Topicbox-Message-UUID: 859e5d78-ead0-11e9-9d60-3106f5b1d025 If you are jonesing for automatically-generated chatter, you can try running this via cron: % cat /cron/$user/cron X * * * * yoursys sourcesmail %=20 (where X is your favorite random number between 0 and 59) % cat $home/bin/rc/sourcesmail #!/bin/rc d=3D`{date -n} sleep 1 if(! test -f $home/lib/sourcesmailtime) =09touch $home/lib/sourcesmailtime 9fs sources newer=3D`{ =09ls -rt /n/sources/extra/changes/*/* $home/lib/sourcesmailtime | =09sed -n '/sourcesmailtime/,$p' | grep -v sourcesmailtime } if(~ $#newer 0) =09exit 0 for(i in $newer) =09mail -s $i `{cat /dev/user} <$i touch -t $d $home/lib/sourcesmailtime %=20 Russ