Created
May 1, 2015 05:20
-
-
Save gb-swatanabe/dc6e9716cc2b4305d3d2 to your computer and use it in GitHub Desktop.
任意の長さの英数記号パスワードを生成するshellワンライナ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /dev/urandom | tr -dc '0-9a-zA-Z!$%&' | fold -w 16 | head -1 | |
a$L73NTcB&MMTzdl | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tr -d パターン .... 入力からパターンに当てはまる文字を削除する
tr -dc パターン .... 入力からパターンに当てはまらない文字を削除する(-c ... 反転)
fold -w .... 指定した文字数で改行する