Last active
September 20, 2021 07:58
-
-
Save JonWatkins/f69b366c5ef989ab8a1e to your computer and use it in GitHub Desktop.
Silly joke bash script.
This file contains hidden or 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 | |
| curl "https://gist.githubusercontent.com/JonWatkins/f69b366c5ef989ab8a1e/raw/b021e57a53b42c66541d654222b9dc52337abbc0/russia" -o "/usr/local/bin/russia" | |
| chmod +x /usr/local/bin/russia |
This file contains hidden or 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 | |
| JOKES[0]="In soviet russia, you don't release software. Software release you" | |
| JOKES[1]="In soviet russia, you don't test software. Software test you" | |
| JOKES[2]="In soviet russia, you don't integrate A.P.I. A.P.I integrate you. Then explode" | |
| JOKES[3]="In soviet russia, you don't write code. Code write you" | |
| # Get the length of the array | |
| LEN=${#JOKES[@]} | |
| # Get a random number between 0 and the array length | |
| RAND=$(( RANDOM % LEN )) | |
| # Commands the mac to tell the joke you will need to have the yuri voice installed | |
| # for it to sound russian, else it uses the default voice. | |
| say -v "yuri" ${JOKES[RAND]} |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simple way to install the script. You may also need to install the "yuri" voice for the best effect.