aboutsummaryrefslogtreecommitdiff
path: root/bin/pwg.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pwg.sh')
-rw-r--r--bin/pwg.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/pwg.sh b/bin/pwg.sh
new file mode 100644
index 00000000..e73ae97a
--- /dev/null
+++ b/bin/pwg.sh
@@ -0,0 +1,6 @@
+# Shortcut to generate just one strong password with pwgen(1)
+# If any arguments are provided, those are used instead
+if [ "$#" -eq 0 ] ; then
+ set -- --secure -- "${PWGEN_LENGTH:-16}" "${PWGEN_COUNT:-1}"
+fi
+pwgen "$@"