You are not logged in.
Pages: 1
i use it for quite some time with conky to list my tasks, it is very simple
#!/bin/bash
FILE="/home/$USER/Documents/todo.txt"
case $1 in
--add | -a)
echo " -$@" >> ~/.todo.tmp
sed -i s/--add//g ~/.todo.tmp
cp ~/.todo.tmp $FILE
;;
--clear)
echo > $FILE
echo > ~/.todo.tmp
;;
--delete | -d )
sed '/'"$2"'/d' $FILE > ~/.todo.tmp
cp ~/.todo.tmp $FILE
;;
--show | -s)
cat $FILE
;;
--help | -h)
echo -e "usage: todo [ -a |--add ] [ --clear ] [-d |--delete] [ -s | --show] [-h |--help]"
;;
*)
echo -e "Wrong!Type --help for help."
esac
exit 0
Offline
Pages: 1