Last month, my ten years old lappy said enough. Well, it can boot, but it doesn't get the plug correctly, so it has to stay pretty static. It came with windows 98 installed, and I've done most of my uni tasks there, as well as installing tenths of linux distros (until vectolinux).
While moving files from its HD to a safer place, I found a bash script (works on zsh too) I did about 5 years ago, which emulated a 'mute' function, and could be called through a shell (or through xbindkeys / keylaunch / ratpoison binds).
The funny thing about it is that it modifies itself to remember the last volume that was set, to restore it afterwards.
I know it could be done using a file to store the previous volume value (and in fact, I use a trick of the same kind), but well, I liked to see that trick again. It uses sed to substitute a variable that is later tested if it's 0. Pretty easy stuff.
It makes me remember my first questions about self modifying code. Now, with lisp and smalltalk, living in a life environment, everything is clearer (sure?).
Comments and improvements are obviously welcome. Enlighten me!