Skip to content

Instantly share code, notes, and snippets.

@mbasaglia
Created July 26, 2017 12:45
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 mbasaglia/febdc994ee0ebc6da33fc6ac2e6ab0a8 to your computer and use it in GitHub Desktop.
Save mbasaglia/febdc994ee0ebc6da33fc6ac2e6ab0a8 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "This script will determine the future of all humanity"
read -n 1 -s -r -p $'Press \x1b[1mANY\x1b[m key to continue\n'
read -n 1 -s -r -p $'Do you want humanity to survive? [Y|n]\n' hooman
if [ "$hooman" = "n" ]
then
read -n 1 -s -r -p $'You are about to kill all humans, confirm? [y|N]\n' confirm
if [ "$confirm" = "y" ]
then
echo "Exterminating humanity..."
killall humans &>/dev/null
else
echo "Operation canceled"
fi
else
echo "Humanity will survive"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment