diff options
Diffstat (limited to 'extra/qotd-update.sh')
-rwxr-xr-x | extra/qotd-update.sh | 12 |
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 | |||
4 | qotd_file=$HOME/qotd.txt | ||
5 | |||
6 | awk '{print;}/~ ~ ~/{exit;}' "$qotd_file" >/tmp/qotd | ||
7 | echo >>/tmp/qotd | ||
8 | echo "~ ~ ~" >>/tmp/qotd | ||
9 | echo >>/tmp/qotd | ||
10 | fortune >>/tmp/qotd | ||
11 | |||
12 | mv /tmp/qotd "$qotd_file" | ||