Shared publicly  - 
 
Command line Russian roulette

[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo Click
(I saw it on FB but g+ is the only place for this (so such a comment here too..)
3
6
Leandro Piccilli's profile photoJonas Fonseca's profile photoSascha Dewald's profile photoSalvatore Bognanni (ο Σωτηράκης σας)'s profile photo
4 comments
 
Just need to sneak that into someones .bashrc file next April 1, and hilarity will soon follow.
 
We need men like you in the army
 
+dor laor there's a bug here, distribution is not even, (2**15-1)%6!=0, so the probability of getting 0 is slightly larger.

❯ bash -c 'for (( i=1; i<10000000; i++));do [ $[ $RANDOM % 6 ] == 0 ] && echo a ;done|wc -l'
 1668842
❯ python -c 'print "",10000000./6'
 1666666.66667
Add a comment...