Skip to content

Instantly share code, notes, and snippets.

@glenjamin
Created October 29, 2014 09:38
Show Gist options
  • Save glenjamin/34fcd7bc0ed4b8a91c1d to your computer and use it in GitHub Desktop.
Save glenjamin/34fcd7bc0ed4b8a91c1d to your computer and use it in GitHub Desktop.
Prank for when someone's left their computer unlocked
function cd() {
# Aliases
alias cd=''
alias exit=''
# Variables
NONE='\033[00m'
RED='\033[01;31m'
SLEEP=`which sleep`
SEQ=`which seq`
# Remove Path
export PATH=''
# Script
echo -e "${RED}WARNING: FORMATTING HARD DRIVE.${NONE} This may take a few minutes."
for i in `${SEQ} 1 300`;
do
echo -n '.'
if [ $(( $i % 50 )) -eq 0 ] ; then
echo
fi
`${SLEEP} 0.1`
done
}
@ultrafez
Copy link

ultrafez commented Nov 7, 2014

It should edit itself out of the .bash_history as well for maximum stealth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment