plan-of-week 411 Bytes
Newer Older
Nico Schottelius's avatar
+plan  
Nico Schottelius committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#!/bin/sh
# Nico Schottelius
# 2014-06-08
# Show the plan of the week


if [ "$#" -ne 1 ]; then
    echo "$0 <directory-with-notes>"
    exit 1
fi

dir=$1; shift

start=1
end=7

day=$start

while [ "$day" -le "$end" ]; do
    date="$(date +%F -d "$day days")"
    file="$HOME/privat/persoenlich/notizen/$date"

    if [ -f "$file" ]; then
        echo "$date"
        cat "$file"
    fi
    day=$((day+1))
done