Skip to content

Instantly share code, notes, and snippets.

@madprops
Last active August 11, 2020 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madprops/0aff260cb94efbb782ae5a0e10246859 to your computer and use it in GitHub Desktop.
Save madprops/0aff260cb94efbb782ae5a0e10246859 to your computer and use it in GitHub Desktop.
#!/bin/bash
n=$((1 + RANDOM % 2))
if [[ "$n" == "1" ]]; then
str=$(shuf -n1 /usr/share/dict/american-english | cut -d$'\t' -f1 | tr '\n' ' ' | sed "s/'s//g")
else
str=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 4 | head -n 1)
fi
xdotool key Control_L+a
xdotool key BackSpace
xdotool type "$str"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment