Created
October 28, 2012 08:04
-
-
Save awreece/3968020 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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