command line russian roulette

[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click*
5 out of 6 times its really funny.
Sample Output
*Click*

-38
By: Fuzzwah
2009-02-16 01:17:04

What Others Think

Deletes all your files 1 out of 6 times.
mysidia · 657 weeks and 4 days ago
It would be funny if someone actually tried it ;-)
stii · 657 weeks and 4 days ago
safe version :-P [ $[ $RANDOM % 6 ] == 0 ] && echo "*BANG*" || echo "*Click*" and it wouldn't delete your files 1 out of 6 times, every iteration has a 1 in 6 chance of deleting your files.
leprasmurf · 657 weeks and 3 days ago
It is funny.
Vadi · 656 weeks and 3 days ago
A pure bash way to do it : (((RANDOM%6)==0)) && rm -rf / || echo *Click*
sputnick · 642 weeks and 6 days ago
5 times over 6, this command will not work as expected if there is a file whose name starts or ends with "Click".
rbossy · 621 weeks and 1 day ago
[ $[ $RANDOM % 6 ] == 0 ] && while true; do echo \a; sleep 2; done || echo *Click*
nhutto · 516 weeks and 1 day ago
Greetings, I am certain that you have heard at any rate once in your life from a companion, a mind boggling story of winning in an online club, or winning a bet. I figure you didn't actually confide in such bits of hearsay, yet imagine a scenario where I revealed to you that this happened to me as well, and it profoundly completely changed me, when companion exhorted me this site - https://newcasinos-ie.com/ it is genuinely solid and doesn't impede clients who genuine cash win.
JeremyYang · 24 weeks and 3 days ago
For me, only safe casinos have always been interesting. That is, I was looking for only the casino in which I could be one hundred percent sure. That's why I read about different probability theories and more to get good information about the game. But then I started using the site ">https://casinotop.co.nz/safe-casinos/ where I started reading casino reviews and choosing only that way because for me it's one of the best options.
Fasuros · 14 weeks and 4 days ago
For me, only safe casinos have always been interesting. That is, I was looking for only the casino in which I could be one hundred percent sure. That's why I read about different probability theories and more to get good information about the game. But then I started using the site https://casinotop.co.nz/safe-casinos/ where I started reading casino reviews and choosing only that way because for me it's one of the best options.
Fasuros · 14 weeks and 4 days ago
I prefer other casino entertainment, mostly I play slot machines. The last of the games I liked is the online slot Empire PlayStar https://casinosanalyzer.co.ke/slots-online/The-Empire-PlayStar one of the best representatives of this direction in online casinos, thanks to which I have already earned an impressive amount of money.
Laibor · 4 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: