From d73f7e2c84bd6dcb107691055acc5bf68b5b733f Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Fri, 15 Nov 2024 13:18:48 +0100 Subject: Add cowsay-total-war-quotes script --- local/bin/cowsay-total-war-quotes | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 local/bin/cowsay-total-war-quotes (limited to 'local/bin') diff --git a/local/bin/cowsay-total-war-quotes b/local/bin/cowsay-total-war-quotes new file mode 100755 index 0000000..13ae92d --- /dev/null +++ b/local/bin/cowsay-total-war-quotes @@ -0,0 +1,10 @@ +#!/bin/sh + +quotes_path="${XDG_DATA_HOME:-"$HOME/.local/share"}/total_war_quotes" + +< "$quotes_path" sed 's/^$/#/' | + tr '#' '\0' | + shuf --zero-terminated --head-count 1 | + sed '/^$/ d' | + tr -d '\0' | + cowsay -W 80 -n -- cgit