Command Line Russian Roulette

Play russian roulette in your command line

Found a very funny comic on commicstrip.

Commic from commicstrip.

Commic from commicstrip.

nixcraft has this article that explains these commands.

[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*

or

[ $[ $RANDOM % 6 ] == 0 ] && rm -rf --no-preserve-root / || echo *Click*

or a safer version

[ $[ $RANDOM % 6 ] == 0 ] && echo '*Oh nooo*' || echo '*Click*'

On reddit someone saw an ad from infinum about this.

on reddit.

on reddit.

Planted: by ;

L Ma (2017). 'Command Line Russian Roulette', Datumorphism, 05 April. Available at: https://datumorphism.leima.is/til/programming/command-line-russian-roulette/.