From eec9489840aa0eb3d1d256e7fc1d5dc868a424fe Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 8 Jun 2014 22:43:20 +0200 Subject: [PATCH] +plan Signed-off-by: Nico Schottelius --- plan-of-week | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 plan-of-week diff --git a/plan-of-week b/plan-of-week new file mode 100755 index 0000000..90b8210 --- /dev/null +++ b/plan-of-week @@ -0,0 +1,28 @@ +#!/bin/sh +# Nico Schottelius +# 2014-06-08 +# Show the plan of the week + + +if [ "$#" -ne 1 ]; then + echo "$0 " + 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