My lenovo t61p has a little led light for lighting up the keyboard when its dark. I’d like to write a little script to turn the light on and off. The file which controls the light is located at /proc/acpi/ibm/light. The command ‘echo “off|on” > light’ will turn the light on or off. I’d like the script to be smart enough to figure out whether the light is on or off. The problem is that from a shell script i am unable to store the data in ‘light’ in a variable. If type ‘cat light’, i get
status: off
commands: on, off
However, no matter what I try, i am unable to store this information in any way.
Any ideas?
Mike