X-Git-Url: https://software.frrobert.com/stationnotifier/blobdiff_plain/2c230c06fe0863ec3ac85bac3897d03ffcc065f0..HEAD:/notificatorossl diff --git a/notificatorossl b/notificatorossl index 4b2a9e5..ce4aef4 100755 --- a/notificatorossl +++ b/notificatorossl @@ -35,8 +35,9 @@ do notifications=${my_array[2]} echo "" > $tmpfile if [[ $notifications -gt $lasttime ]]; then + new=$(expr $notifications - $lasttime) echo -en "\007" - echo "You have new notifications!" + echo "You have $notifications notifications and $new new notifications!" read -p "Press enter to continue, or either type amfora or lagrange to go to notifications" answer case $answer in amfora) @@ -55,6 +56,6 @@ echo "waiting for new notifications" lasttime=$notifications unset my_array fi - sleep 60 + sleep 600 done