From: Silvio Rhatto Date: Sun, 5 Jun 2022 13:10:29 +0000 (-0300) Subject: Fix: xalarm: simple argument checking X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=5a246b2527ae1ed82e8731b9c2752df6b67b7ddd;p=utils-x11.git Fix: xalarm: simple argument checking --- diff --git a/xalarm b/xalarm index 399e4e6..63baf43 100755 --- a/xalarm +++ b/xalarm @@ -20,6 +20,11 @@ function xalarm_set { shift MESSAGE="${*:-Alarm!}" + # Simple argument checking + if ! echo $DELAY | grep -q '^[0-9]'; then + xalarm_usage + fi + # Suppor for HH:MM format if echo $DELAY | grep -q '[0-9]:[0-9][0-9]'; then NOW="`date +%s`"