fun scripts

Lets get a list of everyones funny scripts

sure, i'll bite. here's my version of an Obfuscated Ksh script:
Works on Solaris

_="$(($$\/$$))";$(`[[ "${#@}" \
!= "${_[*]:-)}" ]];`;)&&\exit \
"$((${?%%,}+${_[@]:=%}))"||$(`\
"${_[@]:+:}">|"${@}".~`:)&&$(`\
\sed \-${!:-e} '/^\(\<.*\>\)$/\
,/^\(\<.*\>\)$/{'"${_[*]:?~}"'\
,$s~^\(\<.**\>\)$~|&|~;}' \-e \
'/[:-)]/,/[%-!]/{$,$y?^?#?;}'<\
+("${@:-)}")>>".//${1##/*/}.~"\
;`;)&&$(>&-;:`${-:+};<&-`;$!);\

It has at least some error checking and returns the correct status
if something goes wrong.

Oh. And notice the variety of smiley faces in there.

This is an old one.

At a job interview this was a script I had to explain.

:(){ :|:& };:

During a job interview?! imho -- not a very constructive question...

This thing doesn't parse on my system. But what I'd expect is
nothing, since usually the null command comments out the rest
of the line effectively.

Tried it. It doesn't parse on my system in ksh, csh, sh or bash.

Here's one to try on a terminal that supports colors:

perl -e 'for(0..2){&x($_=q^44,37:07* %41,31:20#%-%44,37:06 *%  %47,37:20 %-^)};
&x($_=q^44,37:07* %41,31:20#%-^);for(0..2){&x($_=q^%47,37:34 %-%41,31:34#%-^)};
sub x{for(split(/%/)){s/(\d\d),(\d\d):/\033[$1m\033[$2m:/;
s/:(\d\d)(\D*)/$2x$1/e;s/-/\033[0m\n/g;print;}}'

Oh. Just reading it, I'd say this:

Looks like a function declaration with an invalid name, the colon NOP command.

Then it pipes the output of the NOP command to another NOP command
and sticks it in the background.

The {} delimit the function declaration.

The ; is the command separator.

And the final : is just a NOP again.

oh. it does parse if you do this:

_(){ :|:& };:

That little guy looks like he'll provide more forks than I have in my kitchen.

Link for explanation (and it's not really funny IMO)

Here too:

Fork bomb - Wikipedia, the free encyclopedia