Skip to content

Instantly share code, notes, and snippets.

@jmillerdesign
Created August 21, 2018 23:31
Show Gist options
  • Save jmillerdesign/75282c7a6f814c7d5f9b80efb3dacc3f to your computer and use it in GitHub Desktop.
Save jmillerdesign/75282c7a6f814c7d5f9b80efb3dacc3f to your computer and use it in GitHub Desktop.

Revisions

  1. jmillerdesign created this gist Aug 21, 2018.
    7 changes: 7 additions & 0 deletions password-generator.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #!/usr/bin/env bash

    # Example: lKJjF7cP9V-6GcNOJQJX9
    function pw() {
    string=$(LC_ALL=C tr -dc "a-zA-Z0-9" < /dev/urandom | head -c 20)
    echo ${string:0:10}-${string:10:10}
    }