Plan 9 from Bell Labs’s /usr/web/sources/contrib/rsc/mailyesterday

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

rfork e
n=1
if(! ~ $#* 0){
	n=$1
	shift
}
cd /sys/lib/dist/changes
date=`{date `{echo `{date -n}^-$n^*86400 | hoc}}
makemail $*
if(! grep -s NEED.SOME.FILES sum.all){
	x=(changes: $date(1) $date(2) $date(3) $date(6))
	upasname=9trouble
	y=$date(6)
	d=`{echo $date(3) | sed 's/^.$/0&/'}
	m=`{echo $date(2) | sed 's/Jan/01/; s/Feb/02/; s/Mar/03/; 
		s/Apr/04/; s/May/05/; s/Jun/06/; s/Jul/07/;
		s/Aug/08/; s/Sep/09/; s/Oct/10/; s/Nov/11/; s/Dec/12/'}
	cp sum.all /n/sources/extra/changes/$y/$m$d
	#rm *.txt *.txt.* grp.*
	# { echo '(Would go to 9fans)'; cat sum.all } | mail -s $"x 9trouble
	{
	#	echo From 9trouble `{date}
		echo 'From: "Sources Updates" <[email protected]>'
		echo 'Subject:' $"x
		echo
		cat sum.all
		echo
	} |mail 9trouble
	# mail -s $"x 9trouble <sum.all
}
if not {
	{
		echo 'From: "Sources Updates" <[email protected]>';
		echo Did not mail 9fans - still need some annotations
		echo 
		cat sum.all
	} | mail -s 'need some help' rsc
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].