Skip to content

Instantly share code, notes, and snippets.

@phamquocbuu
Created September 7, 2022 03:03
Show Gist options
  • Save phamquocbuu/ebd53500208c252430451c7fb869178d to your computer and use it in GitHub Desktop.
Save phamquocbuu/ebd53500208c252430451c7fb869178d to your computer and use it in GitHub Desktop.
Generate Random String in Bash
alias rando="cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20; echo;"
alias randoo="cat /dev/urandom | tr -dc '[a-zA-Z0-9-_+=]\/}{' | fold -w ${1:-20} | head -n 1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment