bin="$arch" while true do current_led_value=`cat /var/ledvalue` if [ $(( $current_led_value & 0x00010000 )) != 0 ]; then echo [$(date)] The NAS is currently in Standby Mode else echo [$(date)] The NAS is currently not in Standby Mode: fi sleep 15 done