Skip to content

Instantly share code, notes, and snippets.

@wyanez
Created November 7, 2010 01:22
Show Gist options
  • Save wyanez/665872 to your computer and use it in GitHub Desktop.
Save wyanez/665872 to your computer and use it in GitHub Desktop.
[bash]Script que muestra un mensaje aleatorio obtenido de fortunes usando cowsay
#!/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