dotfiles2/base/bin/genpw

10 lines
153 B
Plaintext
Raw Normal View History

2022-08-06 05:16:17 +00:00
#!/bin/sh
if [ -z "$1" ] ; then
echo "usage: $0 [length]" >&2
exit 1
fi
LC_ALL=C tr -dc '[:alnum:]' </dev/urandom | \
fold -w$1 | head -n1