# UNISRC_ID: @(#)remind.sh	26.1	84/07/03  
# Script to perform personal reminder service.

cd					# assume home directory.
file=".remind"				# reminders file.

if [ $# = 0 ]
then
	echo "Enter your reminder; end with ^D:"
	cat >>$file
	echo "\nCurrent reminder:"
	cat $file

elif [ $1 = "-l" ]
then
	if [ -s $file ]
	then
		echo "Reminders:"
		cat $file
	fi

elif [ $1 = "-e" ]
then
	echo "Calling ${EDITOR:="vi"}; write and exit when done."
	$EDITOR $file
elif [ $1 = "-c" ]
then
	rm -f $file
	touch $file
	echo "Reminders cleared"
else
	echo "usage: remind [-l] [-c] [-e]"
fi
