Browse Source

Initial commit

master
Patrick Lühne 5 years ago
commit
0b36708720
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
  1. 17
      README.md
  2. 3
      random-password

17
README.md

@ -0,0 +1,17 @@
# random-password
> Generate random passwords
## Overview
`random-password` randomly generates a password with a specified length (default: 32 characters).
## Usage
```sh
$ random-password
6ND@#4>U)=j!<D_VJsL=a9|C|*eidR64
$ random-password 16
59ZT<XK+J<|:@Su0
```

3
random-password

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