summaryrefslogtreecommitdiffstats
path: root/modules/sleep
blob: b8d350f79610d2fefc563580dac2e86ed05c1173 (plain)
1
2
3
4
5
6
7
8
9
10
#! /bin/sh
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
      sleep "$1"
    fi
esac