Skip to content

Instantly share code, notes, and snippets.

@golubov-andrey
Created November 1, 2018 15:44
Show Gist options
  • Select an option

  • Save golubov-andrey/c59e6187c9070883f90c53478da24b57 to your computer and use it in GitHub Desktop.

Select an option

Save golubov-andrey/c59e6187c9070883f90c53478da24b57 to your computer and use it in GitHub Desktop.
Generate password with help openssl
#!/bin/bash
if [ -z "$1" ] ; then
charNum=10
else
charNum="$1"
fi
openssl rand -base64 128 | egrep -o '[A-Za-z0-9]' | tr -d '\n' | cut -c1-$charNum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment