Skip to content

Instantly share code, notes, and snippets.

@ikcaro
Created June 24, 2010 06:56
Show Gist options
  • Save ikcaro/451091 to your computer and use it in GitHub Desktop.
Save ikcaro/451091 to your computer and use it in GitHub Desktop.
Como generar números aleatorios desde la consola
#numero aleatorio
echo $RANDOM
#numero aleatorio [1-15]
echo $[ ($RANDOM % 15) + 1 ]
#numero aleatorio [15 - 25]
echo $[ ($RANDOM % 10) + 15 ]
@ikcaro
Copy link
Author

ikcaro commented Jun 24, 2010

Como generar números aleatorios desde la consola (fuente: http://gnuowned.tumblr.com/post/729749919/como-obtener-numeros-aleatorios-desde-la-shell)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment