Using `remind` to get next weeks schedule
I have just started using the remind tool on GNU/Linux: remind man page. I have the following bash functions using remind to get todays, tomorrows and this weeks reminders
today() {
remind $SCHEDULE
}
tomorrow() {
tomorrow=`date --date=tomorrow +"%d %b %Y"`
remind $SCHEDULE $tomorrow
}
thisweek() {
remind -mc+ $SCHEDULE
}
Here $SCHEDULE is the path to my reminder file i use for all appointments, anniversaries etc. today
and tomorrow
simply uses remind
to list the reminders for a single day in list form. In thisweek
, remind -mc
generates a table for the present week with all reminders for the involved dates. I would like to have a nextweek
function that generates the开发者_JAVA技巧 table for the next week ie. the days Monday through Sunday where Monday is the first Monday after todays date. I cant figure out if this is doable using remind
.
I didn't see any options for remind to do it directly, so awk to the rescue: output 2 week's worth, and remove the first week with awk.
remind -mc+2 "$SCHEDULE" | awk '/^\+/ {n++} n!=2'
精彩评论