[Remind-Fans] mailing myself items for next few days

Christian Gaida ch.gaida at gmx.de
Thu Aug 20 13:51:40 EDT 2009


Hi Thomas,

On 2009-08-20 Thomas Klausner wrote:
> The "head -40" is just a workaround -- basically I would like to just
> get the -n output for the next 2 or 3 days, but I didn't find a remind
> option for that.

Something like this: remind -n | sort | head -n 3
Reminder for the next 3 days.

I am using a small shell script for my daily reminder mail:

#!/bin/sh
#
# This small script uses remind to generate a weekly calendar
# and the next important dates and msmtp to send the output to
# an email account
# The first argument is the number of important dates to print
# The second argument is the email address
# The third optional argument is the number of weeks to print
# Take care that the .reminders file is in your home

if [[ $3 == "" ]] 
then
    NUMWEEK=1
else 
    NUMWEEK=$3
fi

TO="To: $2"
FROM='From: remind <email.reminder at gmx.net>'
SUBJECT="Subject: Your daily calendar"

BODY=`remind -m -c+$NUMWEEK`
BODY2=`remind -n |sort|head -n $1`

echo -e "$TO\n$FROM\n$SUBJECT\n\n$BODY\n\n$BODY2" |
	`msmtp -a gmx -f email.reminder at gmx.net $2`

Best wishes 
Christian



More information about the Remind-fans mailing list