#!/bin/dash flash() { second="$(date +'%s')" if [ $((second % 2)) = 1 ]; then echo $1 else echo $2 fi } sep="|" message="$(volume) $sep $(network) $sep $(temp) $sep $(datetime)" if [ ischarging ]; then echo "$message" else flash "NOT CHARGING" "$message" fi