#!/bin/bash current=$(xbacklight | awk -F"." '{ print $1 }') echo $current if [ "$current" -lt "100" ]; then xbacklight -inc 10 fi