Download this file


#!/bin/ksh
# Removes items from your $HOME/.todo list
# Written by Wayne Pollock, Tampa Florida 1996

PATH=/bin    # For extra security
umask 077    # Ensures the temporary files are private

FILE=$HOME/.todo
TempFile=/tmp/todo.$$

if [ $# != 1 ]
then
	echo "### Error:  type 'didit #' to remove item # from todo list" >&2
	echo >&2
else
	sed "$1d" <$FILE >$TempFile
	if [ $? = 0 ]
	then
		mv $TempFile $FILE
	else
		echo "### Error: todo file not modified!" >&2
		rm -f $TempFile 2>/dev/null
	fi
fi




Send comments and questions to pollock@acm.org.