aboutsummaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2021-12-09 19:43:24 -0500
committertdro <tdro@users.noreply.github.com>2021-12-09 19:43:24 -0500
commit4cf2a1a1e460b3b984103aec33eec1d2842cb67e (patch)
tree0763005374ba0ef8815c480ccf29f9dd92d96131 /.local
parent9b21f1355f503474fbf7597f1259a13a543a967a (diff)
downloaddotfiles-4cf2a1a1e460b3b984103aec33eec1d2842cb67e.tar.gz
dotfiles-4cf2a1a1e460b3b984103aec33eec1d2842cb67e.tar.bz2
dotfiles-4cf2a1a1e460b3b984103aec33eec1d2842cb67e.zip
.local/bin: Add portmanteau
This word does not exist.
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/portmanteau6
1 files changed, 6 insertions, 0 deletions
diff --git a/.local/bin/portmanteau b/.local/bin/portmanteau
new file mode 100755
index 0000000..4b77d63
--- /dev/null
+++ b/.local/bin/portmanteau
@@ -0,0 +1,6 @@
+#!/bin/sh -eu
+word=$(diceware --num 2 --delimiter " ")
+first=${word%??? *}
+second=${word#* ???}
+
+printf '%s\n%s%s\n' "$word" "$first" "$second" | tr '[:upper:]' '[:lower:]'