开启背光灯:sl on 或者 sl ON
关闭背光等:sl off 或者 sl OFF
#!/bin/bash if [ "$1" = "on" ] ||[ "$1" = "ON" ]; then xset led named 'Scroll Lock' elif [ "$1" = "off" ] ||[ "$1" = "OFF" ]; then xset -led named 'Scroll Lock' else echo "Usage: $0 on/off" exit 1 fi exit 0