nsbin/show_calendar
Nico Schottelius cf4aed7452 update
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2014-02-26 14:24:29 +01:00

29 lines
568 B
Bash
Executable file

#!/bin/sh
#
# Nico Schottelius
# Date: 13-May-2003
# Modified: 2004-09-06
# Modified: 2012-03-06
# usage: show_calendar <date> [date]
# Format: DD.MM., DD.MM.YYYY
# add $CALDIR/files:
# -----------------------
# cat $CALDIR/test
# 01.09: auto ansehen..
# -----------------------
#
CALDIR=~/.calendar/
if [ $# -lt 1 ]; then
echo `basename $0` 'day.month [day.month.year]'
exit 1
fi
# grep_param="-e ^TO.DO:"
for arg in "$@"; do
grep_param="${grep_param} -e ^${arg}:"
done
# set -x
find "$CALDIR" -type f -exec egrep --with-filename -A 2 $grep_param {} \;