Last active
August 11, 2020 14:35
-
-
Save madprops/0aff260cb94efbb782ae5a0e10246859 to your computer and use it in GitHub Desktop.
This file contains 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
#!/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