I have the following script (based on this):
#!/bin/bash
runtime=$(zenity --title "Send notification repeatedly" --entry "Enter the period in minutes like this: nn minutes")
endtime=$(date -ud "$runtime" +%s)
while [[ $(date -u +%s) -le $endtime ]]
do
notify-send "Hello"
sleep 10s
done
man date has this:
-d, --date=STRING display time described by STRING, not 'now'
but I couldn't find an explanation for "STRING".
All of the following work when entered in the zenity window:
1 minute1 minutesand1 min
But 1 m doesn't. Where is what is acceptable as "STRING" described? I couldn't find anything in man date.
The other thing is the purpose of +%s. What does it do?