summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d0048c3)
Work on file bin/calendar
Co-Authored-By: Dennis Ritchie <dmr@research.uucp>
Synthesized-from: v7
--- /dev/null
+PATH=/bin:/usr/bin
+tmp=/tmp/cal$$
+trap "rm $tmp; exit" 0 1 2 13 15
+/usr/lib/calendar >$tmp
+case $1 in
+-)
+ sed '
+ s/\([^:]*\):.*:\(.*\):[^:]*$/y=\2 z=\1/
+ ' /etc/passwd \
+ | while read x
+ do
+ eval $x
+ if test -r $y/calendar; then
+ egrep -f $tmp $y/calendar 2>/dev/null | mail $z
+ fi
+ done;;
+*)
+ egrep -f $tmp calendar
+esac