Today I did something totally useless.
You know when you start reading articles on various web sites and you get interested in one thing, another thing and before you notice, you spend hour or two on some useless things. I spent hour and a half today on one similar thing. There was and article about some application on Ubuntu, that can download flash videos from the URL you provide, or it can get URL from keyboard. So, I got interested in getting things from keyboard and I did some search in shell, with apropos keyboard. Then I found very nice command setleds.
Setleds can print out the current state of your 3 leds on keyboard, which are showing the states of caps, num and scroll lock. You can set those states with this command too. Having that in mind I got the idea of making leds do what I want ie. what I scripted. Having mixed it up with some nice bash commands too, I made this script which will make your keyboard leds flash nicely.
Just to mention, you have to be in console ie. no graphical surrounding. So, save it and type ctrl+alt+F1, log in and run it. I know this is stupid, but hey! script is useless so there is no use for adapting it for graphical surrounding.
So, there is no particular use for this bash script, but it is funny! Try it (script)!
Have a nice day! Bye!