Turn off the mouse

If you use Linux, with wireless mouse which has a on/off switch, which you forget to switch off while going home,this is what you need to do, write a script.I’m a newbie to shell scripting and loving the things that can be done using it.Okay,I’m using ubuntu 12.04, I read couple of forums and found, when shutting down, couple of scripts are run from specific folder, that folder is /etc/rc0.d in this folder there are already some scripts you don’t want to mess around with that deals with unmounting drives and stuff,I created a file ‘K01DoNotForget’ here the K0# must be added before the file name so as to run it during shut-down process. Here is the script.

#!/bin/sh
STEP=200
for i in \`seq 1 $STEP\`; do
echo "TURN OFF THE MOUSE \\n"
done
```Save it, name it "K01FileName",move it to /etc/rc0.d

So whenever I shut-down, this message appears about 200 times, so it does not get lost among other messages, and I turn off the mouse.