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