about summary refs log blame commit diff stats
path: root/bin/pw
blob: fa337611b7b1a4b7b92c660a546b129c28d94fee (plain) (tree)
1
2
3
4
         
                                    
                                                                   
                   
#!/bin/sh
# generates a password of length $1.
PW=$(tr -cd "[:alnum:][:punct:]"</dev/urandom|fold -w "$1"|head -1)
printf '%s\n' "$PW"