Created
November 7, 2010 01:22
-
-
Save wyanez/665872 to your computer and use it in GitHub Desktop.
[bash]Script que muestra un mensaje aleatorio obtenido de fortunes usando cowsay
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 | |
#requiere: aptitude install cowsay fortunes | |
vacas=(`ls /usr/share/cowsay/cows`) | |
TVacas=${#vacas[*]} | |
NVaca=$((RANDOM%$TVacas)) | |
vaca=${vacas[$NVaca]} | |
fortune | cowsay -f $vaca |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment