blog.dotkam.com stats

AddThis Social Bookmark Button

Russian Roulette in Bash

russian roulette in bash

# [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live”

* You either live or …. rm -rf / :)


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

10 Responses to “Russian Roulette in Bash”

  1. you mad maaann… but yes - it is funny indeed

  2. This is “a some time” old, but the new design is quite good.
    I had my laugh. Good job Photoshopping

  3. Gimp, maaan, Gimp.. no photoshop.. :)

  4. Could not miss that one

    Russians are loyal, at least when they hack you they give you a chance to live ;)

    Wonder how many times this gets run on the “bad” server though, to approach the chance closer to zeroooo

  5. russian piople Says:

    Ва хаха =) Очень смишно. Стёрли /
    Причём тут рулетко?

  6. Don’t know how much of “russian piople” you are (cause of your Russian spelling), but:

    Это же очень просто - в 6 разрядном барабане 1 пуля, дальше мы раскручиваем барабан (”$RANDOM % 6″) и стреляем, если пуля вылетела (… == 0), то / стёрт, если нет (если сгенерировалась цифра > 0), то мы живы!

    “Учите немецкий, чтобы понимать порно”

  7. Hah, nice game.

  8. The Russian roulette in bash was great, really enjoyed it, highly recommended!

  9. А какая разница с кокой стороны барабан крутить ? все равно выйдет 6..или нет ?

  10. @Anjago,

    Не, не всё равно. Выйдет точно как в рулетке - от 0 до 6.. И если не повезёт, то.. будет капыдыдыдышь.. :)

tell me something...
  1. (required)
  2. (valid email required)
  3. Captcha
  4. (required)