1- #! /bin/bash
1+ #! /bin/sh
22
33HELP_MSG=" Tusker : A dead simple todo manager
44
@@ -11,8 +11,8 @@ HELP_MSG="Tusker : A dead simple todo manager
1111
1212FILE_DIR=" $HOME /.cache/tusker"
1313FILE_NAME=" $FILE_DIR /tasks.txt"
14- TICK=' \xE2\x9C\x93 '
15- CROSS=' \xE2\x9D\x8C '
14+ TICK=' ✓ '
15+ CROSS=' ❌ '
1616DELIM=' $$$'
1717
1818check_args () {
@@ -25,7 +25,7 @@ check_args() {
2525 fi
2626
2727 if [ $# -ne 2 ]; then
28- printf " Not a valid command. Type 'tusker help' for usage.\\ n"
28+ printf " Not a valid command. Type 'tusker help' for usage.\n"
2929 exit
3030 fi
3131}
@@ -42,7 +42,7 @@ add_task() {
4242 current_timestamp=$( date +" %d %B %Y %H:%M:%S" )
4343 task_string=" $CROSS $DELIM $task_desc $DELIM $current_timestamp "
4444
45- printf " %b\\ n" " $task_string " >> " $FILE_NAME "
45+ printf " %b\n" " $task_string " >> " $FILE_NAME "
4646}
4747
4848delete_task () {
@@ -64,7 +64,7 @@ show_tasks() {
6464 line_count=$( wc -l $FILE_NAME | awk ' {print $1}' )
6565
6666 if [ $line_count -eq 0 ]; then
67- printf " You're all caught up!!\\ n"
67+ printf " You're all caught up!!\n"
6868 return
6969 fi
7070
@@ -82,22 +82,22 @@ main() {
8282 add)
8383 shift
8484 add_task " $* "
85- printf " Task added\\ n"
85+ printf " Task added\n"
8686 ;;
8787
8888 del)
8989 delete_task " $2 "
90- printf " Task deleted\\ n"
90+ printf " Task deleted\n"
9191 ;;
9292
9393 check)
9494 check_task " $2 "
95- printf " Task marked as done\\ n"
95+ printf " Task marked as done\n"
9696 ;;
9797
9898 uncheck)
9999 uncheck_task " $2 "
100- printf " Task marked as undone\\ n"
100+ printf " Task marked as undone\n"
101101 ;;
102102
103103 show)
@@ -109,7 +109,7 @@ main() {
109109 ;;
110110
111111 * )
112- echo " Not a valid command. Type 'tusker help' for usage."
112+ printf " Not a valid command. Type 'tusker help' for usage.\n "
113113 ;;
114114
115115 esac
0 commit comments