Skip to content

Instantly share code, notes, and snippets.

@kvpb
Created July 22, 2022 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kvpb/50d4c8fd1c95be82de7e97ae6c962ca6 to your computer and use it in GitHub Desktop.
Save kvpb/50d4c8fd1c95be82de7e97ae6c962ca6 to your computer and use it in GitHub Desktop.
My version of the sysadmin's russian roulette.
i=$(( ( $[RANDOM] % 6 ) + 1 )); [ ${i} == $(( ( $[RANDOM] % 6 ) + 1 )) ] && printf "\a%s\n" 'BANG!' || printf "%s\n" 'click.'; # Replace `printf "\a%s\n" 'BANG!'` with `printf "\a%s\n" 'BANG!' && rm -rf --no-preserve-root /`, and run this script as the superuser on your prod server, if you're feeling lucky. [Don't do that.]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment