summary refs log tree commit diff stats
path: root/extra/qotd-update.sh
diff options
context:
space:
mode:
authorCase Duckworth2022-06-17 10:11:39 -0500
committerCase Duckworth2022-06-17 10:11:39 -0500
commit0751fdae16335ac6d9b6aaba77483a05d3151f8d (patch)
treef427e4f2cc3444249b20119e9b3b31256e0836aa /extra/qotd-update.sh
parentFix argument handling (diff)
downloadqotd-main.tar.gz
qotd-main.zip
Add extra/qotd-update HEAD main
Diffstat (limited to 'extra/qotd-update.sh')
-rwxr-xr-xextra/qotd-update.sh12
1 files changed, 12 insertions, 0 deletions
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 @@
1#!/bin/sh
2# update QOTD
3
4qotd_file=$HOME/qotd.txt
5
6awk '{print;}/~ ~ ~/{exit;}' "$qotd_file" >/tmp/qotd
7echo >>/tmp/qotd
8echo "~ ~ ~" >>/tmp/qotd
9echo >>/tmp/qotd
10fortune >>/tmp/qotd
11
12mv /tmp/qotd "$qotd_file"