Skip to content

Instantly share code, notes, and snippets.

@awreece
Created October 28, 2012 08:04
Show Gist options
  • Save awreece/3968020 to your computer and use it in GitHub Desktop.
Save awreece/3968020 to your computer and use it in GitHub Desktop.
‎#!/bin/sh
if [[ `date +"%H"` -lt '8' ]];
then
x=$(($RANDOM % 1000))
y=$(($RANDOM % 1000))
exp=$(($x + $y))
echo "Enter the sum of $x + $y: "
read -e in
if [[ "$in" == *"+"* || "$exp" -ne "$in" ]]; then
echo "You might be drunk, $x + $y = $exp, not $in"
exit -1
fi
fi
exec sudo "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment