scripts for my gemini capsule
fix makeplan for the first 9 days of each month
I had been using a paper bible more, so I didn't notice right away
| -rw-r--r-- | makeplan.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/makeplan.sh b/makeplan.sh index 8a0637d..f3a2515 100644 --- a/makeplan.sh +++ b/makeplan.sh @@ -1,12 +1,12 @@ #!/bin/sh day=$(date +'%j') -day_human=$(date +'%B %d') +day_human=$(date +'%B %d'|sed 's/ 0/ /g') echo "# Reading for $day_human" -nt="$(grep "^$day_human" "$1" | cut -f3)" -ot="$(grep "^$day_human" "$1" | cut -f2)" -ps="$(grep "^$day_human" "$1" | cut -f4)" -pr="$(grep "^$day_human" "$1" | cut -f5)" +nt="$(grep "^$day_human\s" "$1" | cut -f3|head -n1)" +ot="$(grep "^$day_human\s" "$1" | cut -f2|head -n1)" +ps="$(grep "^$day_human\s" "$1" | cut -f4|head -n1)" +pr="$(grep "^$day_human\s" "$1" | cut -f5 |head -n1)" if [ -e /srv/gemini/gemini.zachdecook.com/oyb/$day.mp3 ]; then echo "=> /oyb/$day.mp3 Listen to today's reading by Zach!" |