random-password/random-password
2017-11-18 21:45:05 +01:00

4 lines
153 B
Bash
Executable File

#!/bin/bash
LENGTH=${1:-32}
cat /dev/urandom | tr -dc 'a-zA-Z0-9-_!@#$%^&*()_+{}|:<>?=' | fold -w $LENGTH | head -n 1 | grep -i '[!@#$%^&*()_+{}|:<>?=]'