Initial commit

This commit is contained in:
Patrick Lühne 2017-11-17 11:52:51 +01:00
commit 0b36708720
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
2 changed files with 20 additions and 0 deletions

17
README.md Normal file
View File

@ -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 Executable file
View File

@ -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 '[!@#$%^&*()_+{}|:<>?=]'