I've read some other questions, and I feel like i'm doing exactly as everybody else is, but I just can't find the files.
file="~/.todo/$1.task"
if [ ! -f "$file" ]; then
echo "Error. Task ~/.todo/$1.task not found."
ls ~/.todo/
exit 1
fi
This is inside of a function when del gets called....so with this command, here's the output:
$ ./todo.sh del 19
Error. ~/.todo/19.task not found.
10.task 13.task 16.task 1.task 6.task 9.task tododatesorted
11.task 14.task 18.task 3.task 7.task taskno
12.task 15.task 19.task 4.task 8.task tododates
How come it says it doesn't exist when really it does? I've tried -e and -f flags although I don't fully understand the difference.