Skip to content

Instantly share code, notes, and snippets.

@monkeywithacupcake
Created September 8, 2018 14:01
Show Gist options
  • Save monkeywithacupcake/619664e95468fb59360555e0f79a9ed7 to your computer and use it in GitHub Desktop.
Save monkeywithacupcake/619664e95468fb59360555e0f79a9ed7 to your computer and use it in GitHub Desktop.
A shell script to return a random string
#!/bin/zsh
# returns a random phrase for motivation
# usage `bash encourageme.sh`
aff=("You are enough" "Do one small thing" "Sources say that you can do it" "Just try" "You got this" "You are what you repeatedly do")
theaff=${aff[$(( $RANDOM % ${#aff[@]} + 1 ))]}
say $theaff
echo $theaff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment