From ee245224a41f66c1d370e45d07a7cd2bed44ef57 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 28 Dec 2010 21:13:49 +0100 Subject: Inverted if-then-else logic in sleep --- modules/sleep | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/sleep') diff --git a/modules/sleep b/modules/sleep index b8d350f7..89712cac 100755 --- a/modules/sleep +++ b/modules/sleep @@ -2,9 +2,9 @@ case "$1" in (--help) echo "pause for NUMBER seconds" ;; (*) - if ! echo "$1" | grep -Eq '^([0-9]+(\.[0-9]*)?|[0-9]*\.[0-9]+)$' ; then - echo 'FAIL: $1 is not a number' - else + if echo "$1" | grep -Eq '^([0-9]+(\.[0-9]*)?|[0-9]*\.[0-9]+)$' ; then sleep "$1" + else + echo 'FAIL: $1 is not a number' fi esac -- cgit v1.2.3