allow directories for archival in .calendar
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
dbd9b568c8
commit
a239479b6e
1 changed files with 7 additions and 7 deletions
|
@ -2,7 +2,8 @@
|
||||||
#
|
#
|
||||||
# Nico Schottelius
|
# Nico Schottelius
|
||||||
# Date: 13-May-2003
|
# Date: 13-May-2003
|
||||||
# Last Modified: 2004-09-06
|
# Modified: 2004-09-06
|
||||||
|
# Modified: 2012-03-06
|
||||||
# usage: show_calendar <date> [date]
|
# usage: show_calendar <date> [date]
|
||||||
# Format: DD.MM., DD.MM.YYYY
|
# Format: DD.MM., DD.MM.YYYY
|
||||||
# add $CALDIR/files:
|
# add $CALDIR/files:
|
||||||
|
@ -19,10 +20,9 @@ if [ $# -lt 1 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $CALDIR
|
grep_param="-e ^TO.DO:"
|
||||||
for file in *; do
|
for arg in "$@"; do
|
||||||
for date in $@ TO.DO; do
|
grep_param="${grep_param} -e ^${arg}:"
|
||||||
#egrep --with-filename -A 2 -e "^${date}[:\.]" "$file"
|
|
||||||
egrep --with-filename -A 2 -e "^${date}:" "$file"
|
|
||||||
done
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
find "$CALDIR" -type f -exec egrep --with-filename -A 2 "$grep_param" {} \;
|
||||||
|
|
Loading…
Reference in a new issue