$ cat /home/user/MyDocs/bin/lux.sh lux=0 while [ 1 == 1 ]; do new=`cat /sys/bus/i2c/drivers/tsl2563/2-0029/lux` if [ "$lux" != "$new" ] then lux=$new echo `date '+%y%m%d_%H%M%S'`" "$lux fi