|
|
1.1 root 1: : calendar.sh 4.5 84/02/14
2: PATH=/bin:/usr/bin:
3: tmp=/tmp/cal0$$
4: trap "rm -f $tmp /tmp/cal1$$ /tmp/cal2$$"
5: trap exit 1 2 13 15
6: /usr/lib/calendar >$tmp
7: case $# in
8: 0)
9: trap "rm -f $tmp ; exit" 0 1 2 13 15
10: (/lib/cpp calendar | egrep -f $tmp);;
11: *)
12: trap "rm -f $tmp /tmp/cal1$$ /tmp/cal2$$; exit" 0 1 2 13 15
13: /bin/echo -n "Subject: Calendar for " > /tmp/cal1$$
14: date | sed -e "s/ [0-9]*:.*//" >> /tmp/cal1$$
15: sed '
16: s/\([^:]*\):.*:\(.*\):[^:]*$/y=\2 z=\1/
17: ' /etc/passwd \
18: | while read x
19: do
20: eval $x
21: if test -r $y/calendar
22: then
23: (/lib/cpp $y/calendar | egrep -f $tmp) 2>/dev/null > /tmp/cal2$$
24: if test -s /tmp/cal2$$
25: then
26: cat /tmp/cal1$$ /tmp/cal2$$ | /bin/mail $z
27: fi
28: fi
29: done
30: esac
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.