]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - examples/functions/isnum2
Clean out import-tars branch
[thirdparty/bash.git] / examples / functions / isnum2
diff --git a/examples/functions/isnum2 b/examples/functions/isnum2
deleted file mode 100644 (file)
index e2e7a5f..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-isnum2()
-{
-       case "$1" in
-       '[-+]' | '')    return 1;;      # empty or bare `-' or `+'
-       [-+]*[!0-9]*)   return 1;;      # non-digit with leading sign
-       [-+]*)          return 0;;      # OK
-       *[!0-9]*)       return 1;;      # non-digit
-       *)              return 0;;      # OK
-       esac
-}
-
-# this one handles floating point
-isnum3()
-{
-       case "$1" in
-       '')             return 1;;      # empty
-       *[!0-9.+-]*)    return 1;;      # non-digit, +, -, or .
-       *?[-+]*)        return 1;;      # sign as second or later char
-       *.*.*)          return 1;;      # multiple decimal points
-       *)              return 0;;      # OK
-       esac
-}