Shell Programming Error
I recently wrote a shell program to turn the front LEDs on and off for a flashlight, without having two scripts (one off, one on, which did work). Although the script seems sound to me, i get an error when I run it:
Stderr [: Not Found
Stderr [: Not Found
The script is as follows:
led_status=$(cat /sys/class/leds/flashlight/brightness);
if [ 1 ]
then
if [ "$led_status" = "0" ]
then
echo 3 > /sys/class/leds/flashlight/brightness
fi
fi
if [ "$led_status" = "3" ]
then
echo 0 > /sys/class/leds/flashlight/brightness
fi
|