#!/usr/bin/env bash : "${1?How to use: $0 hh mm}" var_date=$1:$2 echo "(T)omorrow or (t)oday? " read -r var_day case "$var_day" in "T") var_time=$(date --date="${var_date} tomorrow" +%s) ;; "t") var_time=$(date --date="${var_date}" +%s) ;; esac while (( "$var_time" > $(date +%s) )); do sleep 30 done mpc volume 20 > /dev/null echo "ALARM!" mpc play > /dev/null for i in 10 20 30 30 20 10 ; do sleep ${i} mpc volume +10 > /dev/null done exit 0