Skip to content

Commit

Permalink
add remove task
Browse files Browse the repository at this point in the history
  • Loading branch information
Powopaf committed Oct 23, 2024
1 parent 0360c73 commit f86dd88
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion Bash/data
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

test 5 4 0
Empty file removed Bash/rmTodo.sh
Empty file.
8 changes: 7 additions & 1 deletion Bash/todo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ if [ $# -eq 0 ]; then
blue='\033[34m'
reset='\033[0m'
echo -e "Nothing to do :
use ${blue}-add${reset} to add something to do
use ${blue}-help${reset} to see documentation"
exit 0
fi
Expand All @@ -28,8 +27,15 @@ try ${blue}-help add${reset} to add properly a new task"
echo "Task $2 succesfuly add"
exit 0
fi

elif [[ "$1" == "-del" ]] && [[ $# = 2 ]]; then
sed -i "/$2/d" data
echo "Delete task $2"
exit 0

elif [ "$1" = "-help" ]; then
./help.sh "${@:2}"

else
./help.sh
fi

0 comments on commit f86dd88

Please sign in to comment.