Skip to content

Instantly share code, notes, and snippets.

@kevinadi
Created May 2, 2016 06:09
Show Gist options
  • Save kevinadi/9ad966e6574e111f9b3ebd3e04b5e93b to your computer and use it in GitHub Desktop.
Save kevinadi/9ad966e6574e111f9b3ebd3e04b5e93b to your computer and use it in GitHub Desktop.
Fish shell: create 5 random passwords
function random_pwd
for i in (seq 5)
cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 18 | head -n 1 | tr -d '\n' | fold -w 3 | tr '\n' '-'
echo ''
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment