From e578633a77934fb70bbf0e41e5f21bcc89520e7b Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 6 Jul 2022 08:32:20 +0100 Subject: added ksh script --- dayplan.ksh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 dayplan.ksh (limited to 'dayplan.ksh') diff --git a/dayplan.ksh b/dayplan.ksh new file mode 100755 index 0000000..b546a5e --- /dev/null +++ b/dayplan.ksh @@ -0,0 +1,30 @@ +#!/bin/ksh + +# our target file +DATE=$(date +\%Y-\%m-\%d) +TODAY_PLANNER=~/Notes/journal/day_plans/$DATE.txt + +if [[ -a $TODAY_PLANNER ]] +then + vim "$TODAY_PLANNER" +else + touch "$TODAY_PLANNER" + { + echo -e "Date: $DATE + +Goal for Today: [replace this with your goal] +--- + +08:45 - 09:10 - Sophie to school +09:15 - 09:30 - Email +09:30 - 10:00 - +10:00 - 11:00 - +11:00 - 12:00 - +12:15 - 13:00 - Lunch +13:00 - 14:00 - +14:00 - 15:00 - +15:00 - 16:00 - +16:00 - 17:00 - " + } > "$TODAY_PLANNER" + vim "$TODAY_PLANNER" +fi -- cgit v1.2.3