add to ~/.bashrc
to have a password generator that:
- removes problematic characters
- always starts and ends with an english alphabet character
- is of configurable length
pwg() {
case ${1} in
''|*[!0-9]*) password_length=12 ;;
*) password_length=${1} ;;
esac
pwgen -1 --symbols --ambiguous --remove-chars '\`%"><$'"'" ${password_length} 100 | egrep -i '^[a-z].*[a-z]$' | shuf | head -n 1
}