Hmmm I must be making this more difficult than it needs to be.
The basic idea is that I can take a todo item from my todo.txt file and have it added to my reminders file for use with remind which generates a popup notification.
Here is the original script:
This works but right now I am getting:
cat -n ~/Dropbox/todo/todo.txt
read -p "Enter the line number of the task to add to remind " task
sed -n "$task"p ~/Dropbox/todo/todo.txt
message=$(sed -n "$task"p ~/Dropbox/todo/todo.txt)
read -p "What is the trigger date of the reminder?:" triggerdate
read -p "H0w many days in advance should this appear?" daysadvance
read -p "What is the trigger time of the reminder?:" triggertime
echo "REM $triggerdate +$daysadvance AT $triggertime MSG $message %b (in [_countdown(trigdatetime()-current())])" >> ~/Reminder-files/reminders-general
in my reminder file when I only really want
1 2014-06-01* (E) +conputer Fix Mutt's spell check
Fix Mutt's spell check