From 0751fdae16335ac6d9b6aaba77483a05d3151f8d Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 17 Jun 2022 10:11:39 -0500 Subject: Add extra/qotd-update --- extra/qotd-update.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 extra/qotd-update.sh (limited to 'extra/qotd-update.sh') diff --git a/extra/qotd-update.sh b/extra/qotd-update.sh new file mode 100755 index 0000000..b199307 --- /dev/null +++ b/extra/qotd-update.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# update QOTD + +qotd_file=$HOME/qotd.txt + +awk '{print;}/~ ~ ~/{exit;}' "$qotd_file" >/tmp/qotd +echo >>/tmp/qotd +echo "~ ~ ~" >>/tmp/qotd +echo >>/tmp/qotd +fortune >>/tmp/qotd + +mv /tmp/qotd "$qotd_file" -- cgit 1.4.1-21-gabe81